The below works, but the script stops working after one go, because it isn't told to keep repeating itself.
print 'Mud path loaded...' local FP = script.Parent local SP = script.Parent.Parent.StayingPart time1 = (1) --time before falls after step time2 = (2) --time before regenerates SPPos = SP.Position SPFrame = SP.Rotation function onTouch(part) wait(time1) FP.Anchored = false wait(time2) FP.Anchored = true FP.Position = SPPos FP.Rotation = SPPos end FP.Touched:connect(onTouch)
However, it seems that the While True Do breaks the script.
print 'Mud path loaded...' local FP = script.Parent local SP = script.Parent.Parent.StayingPart time1 = (1) --time before falls after step time2 = (2) --time before regenerates SPPos = SP.Position SPFrame = SP.Rotation while true do function onTouch(part) wait(time1) FP.Anchored = false wait(time2) FP.Anchored = true FP.Position = SPPos FP.Rotation = SPPos end FP.Touched:connect(onTouch) end
I have tried moving the second 'end' before the 'FP.Touched:connect(onTouch)', yet to no avail. Suggestions and help, please? I used to be a good programmer, but League of Legends forced it all right outta my brain. xD