Ive used
print(script.Parent.Velocity.Magnitude)
But it Continuously Said 0
Any Help?
bloxxyz, the changed event does not get fired when a part's position changes.
EmperorVolvax, that only works on Non-CFramed/Un-anchored parts.
If the part is CFramed/Anchored, try comparing the part's position to it's previous position for an integer of time under the same as the speed it is being moved at.
The below example is based on the part's position being updated every second
local LastPosition = script.Parent.Position function OnParentMoved() print(script.Parent.Name.." has moved!") end while wait(.9) do if script.Parent.Position ~= LastPosition then OnParentMoved() end LastPosition = script.Parent.Position end
Here, try this script. It gives exact position every time it has changed, detecting movement.
~~~~~~~~~~~~~~~~~
--insert this inside the part that you want to check is moving script.Parent.Changed:connect(function() ---if the part has changed print("has moved or changed") wait() print(script.Parent.Position) --will give you the exact position it has moved every time it moves end)