Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Only plays once?

Asked by
drahsid5 250 Moderation Voter
11 years ago

I made a script that has a GUI animation when my fake health integer <= 0 It works once, perfectly then when the value reaches 0 again, it doesn't even make the GUI visible. Anyone know why?

01local World = script.Parent.Parent.Parent.InWorld
02local DeathMessages = {
03    "You failed..."
04    ,"Epic fail!"
05    ,"HAHAHAHAHAH! YOU DIED!"
06    ,"Try again."
07    ,"NOOOOOO!"
08    ,"Try to stay alive this time? Kthx."
09    ,"Y'know... Irl... YOLO!"
10    ,"Your so good at this game."
11    ,"You did it! YOU DIED!"
12    ,"Don't look into the light!"
13    ,"WHY?!?!??!?!"
14    ,"Uhg..."
15    ,"Good job!"
View all 71 lines...

1 answer

Log in to vote
1
Answered by 11 years ago

It is because you are not cloning that GUI. You are re-parenting it from what I can see.

That makes it so it removes from the game once that player resets. Try cloning the GUI, instead of re-parenting

Ad

Answer this question