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

Can someone help me with my script?

Asked by
red106 0
11 years ago

Well I made this script but I want it to wait a few seconds, but when I put it for more than a second it doesn't work. Can someone help me?

01name="Humanoid"
02 
03robo=script.Parent:clone()
04 
05while true do
06    wait(1)
07    if script.Parent.Humanoid.Health<1 then
08        robot=robo:clone()
09        robot.Parent=script.Parent.Parent
10        robot:makeJoints()
11        script.Parent:remove()
12    end
13end

2 answers

Log in to vote
0
Answered by 11 years ago

The wait time shouldn't affect the code you have there. What's in the output?

Ad
Log in to vote
0
Answered by 11 years ago

Put

1if script.Parent.Humanoid.Health<1 then

Over the wait(1)

0
It makes my game freeze when I start playing :/ red106 0 — 11y
0
Your script must have error then, I can't see one tho. Rainwhal 0 — 11y

Answer this question