How can I make detection when something moving, I mean when something is unanchored and it moving script detecting this.
✓ ANSWER ACCEPTED
How can I add detection to my moving part?
1 answer
✓ Accepted answer
you can use a while loop and continuously check the velocity of the part
local part = path.to.part
while true do
if part.Velocity.Magnitude > 0.1 and not part.Anchored then -- magnitude is the length of a vector
print("part is moving")
else
print("part is not moving")
end
wait()
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
It's working, thank you.