Answered by
6 years ago Edited 6 years ago
here is an easy way, though i cant assure u it will not lag ur game:
place in part that u want to monitor
01 | local part = script.Parent |
06 | local p 1 = part.Position |
10 | if p 1 = = part.Position then |
what this does is it forever checks if the part's position, waits for a frame, then compares the previous position to the new position, all while checking if the part is uncanchored as well. If the 2 positions are the same, then it will add 1 to the frames which the part is inactive for.
Another way would be to use the propertyChanged thing, very much like the first one, but not as good in my eyes due to some inconsistencies with the thing:
01 | local part = script.Parent |
08 | if part.Anchored = = false and changed = = false then |
23 | part:GetPropertyChangedSignal( "Position" ):Connect( function () |
32 | if changed = = false then |