Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a function to tell me how fast I'm falling down?

Asked by 4 years ago
Edited 4 years ago

This question has been solved by the original poster.

I'm making another script for my game that'll tell me how fast I'm falling down, in studs per second. Is there any way that I can figure out how fast I'm falling down? I looked on YouTube and on other forums about the speed that a character falls down, but I didn't find any answers. Does anyone know what to use? By the way, I don't have any code to show you because I don't know.

Thanks, Green_Lime2

0
Check humanoidState and Y velocity tomekcz 174 — 4y
0
Thank you! You have answered my question! Green_Lime2 80 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

My question was answered by tomekcz. Here is the code I used:

while true do

local character = game.Players.LocalPlayer.Character
local rootpart = character:WaitForChild("HumanoidRootPart")
local playergui = game.Players.LocalPlayer.PlayerGui
local velocity = rootpart.Velocity.Y
local velocityNum = math.floor(velocity*1)/1

    playergui.ScreenGui2.TextLabel.Text = (velocityNum.. " s/s")
    wait()
end
Ad

Answer this question