|
currentHeart = "script.Parent.Heart ".. filledHearts
script.Parent:findFirstChild(currentHeart.Name).Image = "http://www.roblox.com/asset/?id=51977605"
Please help me fix this :D |
|
|
Sorry :P here it is
currentHeart = "script.Parent.Heart ".. filledHearts
script.Parent:findFirstChild(currentHeart).Image = "http://www.roblox.com/asset/?id=51977605" |
|
|
What is this line supposed to do?:
currentHeart = "script.Parent.Heart ".. filledHearts |
|
|
currentHeart gets the Current Heart :D
Now the filled hearts value = the number of hearts that are visible.
print(currentHeart) -- 3
script.Parent.Heart 3 |
|
|
Oh, so you want "script.Parent.Heart" in quotes. Hmm. What's currentHeart's classnName (StringValue, I would assume).
Well, try this line instead:
currentHeart = script.Parent.Heart" ..filledHearts.. "" |
|
|
Oops.
currentHeart = "script.Parent.Heart" ..filledHearts.. "" |
|
|
attempt to index a nil value :D |
|
|
It should say what nil value it's talking about. |
|
|
attempt to index a nil value :3
Would it affect the script if currentHealth is just a number value x3
|
|
|
Yes, because you can't put a string (here it's "script.Parent.Heart") in a NumberValue. |
|
|
Now what do I do :3
if I can't string it.
How am I supposed to get the current heart |
|
|
Umm...delete "script.Parent.Heart"? It doesn't seem to do anything...
|
|
|
AgentFirefoxTop 100 PosterJoin Date: 2008-06-20 Post Count: 22404 |
currentHeart = "Heart ".. filledHearts --you want the name, not the path
script.Parent:findFirstChild(currentHeart.Name).Image = "http://www.roblox.com/asset/?id=51977605" |
|
AgentFirefoxTop 100 PosterJoin Date: 2008-06-20 Post Count: 22404 |
currentHeart = "Heart ".. filledHearts --you want the name, not the path
script.Parent:findFirstChild(currentHeart).Image = "http://www.roblox.com/asset/?id=51977605"
Error... Can't believe I didn't see it... |
|
|
Thnak you both.
Now I understand this a bit more :D
But edit on above:
remove .Name |
|
|