Falling speed?
#1
I'm not sure if this can already be done but it would help if there was a way to tell how fast a box or circle is falling.
Reply
#2
[lua]
falling = false
while true do
sleep(0.01)
if Part.Velocity.y < 0 then
falling = true
else
falling = false
end end
[/lua]

Or something like that. Smile
Reply
#3
[lua]
local c = create("Label")
c.Parent = script.Parent


function round(num, idp)
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end


while true do
local FallSpeed = round(script.Parent.Velocity.y)
c.Text = "Fall Speed:"..FallSpeed * -1
sleep()
end
[/lua]

Honestly, I copied off the rounding function somewhere. If the value wasn't rounded, the value would be pretty large.
*Large as in many decimal places.
PS: Just insert this in any part.

Also, if you just want the fall speed of an object when the game is paused, all you need to do is click the object, look at its properties, check under velocity, and check its second value.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)