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

My script suddenly stop running. or it skip only this part of script. why?

Asked by 5 years ago

Here is my script

1if posTag == nil then
2                print("check1")
3                stretch.Size = (hand.Position - arm.Position).Magnitude
4                stretch.CFrame = CFrame.new(arm.Position:Lerp(hand.Position,1/2),hand.Position)
5                print("check2")
6end

The result is that it print "check1" but it doesn't print "check2" and there is no error.

Why??

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago
1if posTag == nil then
2                print("check1")
3                stretch.Size = (hand.Position - arm.Position).Magnitude
4wait(1)
5                stretch.CFrame = CFrame.new(arm.Position:Lerp(hand.Position,1/2),hand.Position)
6                print("check2")
7end

Try using a wait script

0
wait Mr_m12Ck53 105 — 5y
0
You can not use "then" like this. That wrong! Mr_m12Ck53 105 — 5y
0
Try using a wait command DuckyRobIox 280 — 5y
0
Ok I found the problem. It's on line 3. Size must be vector3 but I put it a number Mr_m12Ck53 105 — 5y
Ad

Answer this question