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

Height From The Ground?

Asked by 6 years ago

I need a way to find out the distance between the character's root part, and the ground directly below. How would I go about doing this?

0
Very vague . "ground" ? GingeyLol 338 — 6y

2 answers

Log in to vote
0
Answered by
Rare_tendo 3000 Moderation Voter Community Moderator
6 years ago

Vector3.magnitude

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hrp = char.HumanoidRootPart

local mag = (hrp.Position - workspace.Baseplate.Position).magnitude

print(math.floor(mag))
Ad
Log in to vote
0
Answered by
GingeyLol 338 Moderation Voter
6 years ago
local SomeNumber = 0
while wait(.25) do
SomeNumber = game.Players.LocalPlayer.HumanoidRootPart.Position.Y
print("SomeNumber")
end

Answer this question