Hey!
Why when I set readyForFullSpin1
to false in another function it makes it false (I know this as after each tween in the loop I print it out) but the loop seems to carry on as it keeps on printing false and carries on with the tweens. Does anyone know what I am doing wrong as I can seem to see anything wrong.
Code:
spinModule.spin1 = function()
wait()
print("RockingTug System V1: Attempting to start spin...")
wait(1)
if spinModule.isRideSpinning then
print("RockingTug System V1: Attempt Success. Starting Spin.")
readyForFullSpin1 = true
wait(swingTime+4.5)
spinSTART:Play()
while readyForFullSpin1 do
wait()
spinSTART.Completed:Connect(function() spin180:Play() spinOn180 = true print(readyForFullSpin1) end)
spin180.Completed:Connect(function() spin90:Play() if spinOn180 == true then spinOn180 = false spinOn90 = true print(readyForFullSpin1) end end)
spin90.Completed:Connect(function() spin0:Play() if spinOn90 == true then spinOn90 = false spinOn0 = true print(readyForFullSpin1) end end)
spin0.Completed:Connect(function() spinMINUS90:Play() if spinOn0 == true then spinOn0 = false spinOnMINUS90 = true print(readyForFullSpin1) end end)
spinMINUS90.Completed:Connect(function() spin180:Play() if spinOnMINUS90 == true then spinOnMINUS90 = false spinOn180 = true print(readyForFullSpin1) end end)
if not readyForFullSpin1 then
wait()
print("RockingTug System V1: Stopping Spinning")
break
else
return
end
end
else
print("RockingTug System V1: Attempt Failed.")
end
end