Mehssi
|
  |
| Joined: 15 Mar 2015 |
| Total Posts: 599 |
|
|
| 08 Aug 2017 04:29 PM |
Is there anyway to detect an object in motion without using a while loop? something like Velocity.Changed but obviously that wouldn't work, are loops the only way to do this? |
|
|
| Report Abuse |
|
|
Siccity
|
  |
| Joined: 21 Jun 2009 |
| Total Posts: 14782 |
|
|
| 08 Aug 2017 04:34 PM |
You could connect a function to (part).Changed, then check if the parts velocities ~= 0.
Unfortunately, that would cause the function to fire every time and of the part's properties are changed, but I don't think that's too much of a problem |
|
|
| Report Abuse |
|
|
Siccity
|
  |
| Joined: 21 Jun 2009 |
| Total Posts: 14782 |
|
|
| 08 Aug 2017 04:35 PM |
*part's
*every time any
jesus so many mistakes |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2017 04:49 PM |
VelocityChanged(Part) --Your Code end
YourPart.Changed:Connect(function(Property) if tostring(Property) == "Velocity" then VelocityChanged(YourPart) end end) |
|
|
| Report Abuse |
|
|