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 4 years ago

Here is my script

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

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 4 years ago
Edited 4 years ago
if posTag == nil then
                print("check1")
                stretch.Size = (hand.Position - arm.Position).Magnitude 
wait(1)
                stretch.CFrame = CFrame.new(arm.Position:Lerp(hand.Position,1/2),hand.Position)
                print("check2")
end

Try using a wait script

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

Answer this question