So i don’t think it is possible to solve my problem by checking when a PrismaticConstraint finished moving (because i don’t think it’s possible), but i want to do a smooth part moving (like a tween, but with PrismaticConstraint ). Also if you have a better idea than using a “while true do” loop, feel free to tell it to me!
while true do
spawn(function()
--task.wait(5) ?
game.Workspace:WaitForChild("Parts"):WaitForChild("PartConstrain"):FindFirstChild("PrismaticConstraint").TargetPosition = 80
--task.wait(5) ?
game.Workspace:WaitForChild("Parts"):WaitForChild("PartConstrain"):FindFirstChild("PrismaticConstraint").TargetPosition = 0
--task.wait(5) ?
end)
end
P.S. I put a spawn(function() because there are other things in the loop