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

How do i detect a distance between player's torso and a ground?

Asked by 5 years ago

How do i detect a distance between player's torso and a ground

local FallTrack = nil



function PlayTrack()

FallTrack = FallAnim

FallTrack:Play()

end



function StopTrack()

if FallTrack then

FallTrack:Stop()

end

FallTrack = nil

end

function OnFallDown()
    PlayTrack()
end


Player.Humanoid.FallingDown:Connect(OnFallDown)

When i just jump and then fall the anim plays. I wanna make when i jump and falls like 5 studs freefall anim plays

0
Use ".magnitude". Alphexus 498 — 5y
0
if Player:DistanceFromCharacter(workspace.Baseplate.Position) <= 5 then DeceptiveCaster 3761 — 5y
0
I dont need the baseplate's position, i need the ground any platform SunxLightz 30 — 5y
0
Use raycasting to constantly calculate the distance from the players torso to the ground. https://developer.roblox.com/articles/Raycasting whenallthepigsfly 541 — 5y
View all comments (2 more)
0
I agree Raycasting would work best awsomemike4 3 — 5y
0
thanks! SunxLightz 30 — 5y

Answer this question