of     1   

NutBarrr
#226822984Wednesday, October 25, 2017 11:48 PM GMT

How would I detect if a player is touching the ground and when the player is in the air?
AggressiveCatch
#226823101Wednesday, October 25, 2017 11:51 PM GMT

ray cast down from the humanoid root part, ignore children of the character something along the lines of this: function isOnGround (player) local char = player.Character if char then local hrp = char:FindFirstChild("HumanoidRootPart") if hrp then local ### # ##################### Vector3.new(0, -3.5, 0) local hit = workspace:FindPartOnRay(ray, char) if hit then return true else return false end end end end
Thedagz
#226823119Wednesday, October 25, 2017 11:52 PM GMT

There a couple ways to doing this you could use You could do magnitude if the ground was in small parts, You could also raycast downward 5-6 studs and Region 3 is also a possbility http://wiki.roblox.com/index.php?title=API:Class/Humanoid/FreeFalling ^ that could also work aswell Developer Community discord : discord DOT gg/rfnudw6
AggressiveCatch
#226823183Wednesday, October 25, 2017 11:53 PM GMT

ray cast down from the humanoid root part, ignore children of the character something along the lines of this: function isOnGround (player) local char = player.Character if char then local hrp = char:FindFirstChild("HumanoidRootPart") if hrp then local TAGS = Ray.new(hrp.CFrame.p, Vector3.new(0, -3.5, 0) local hit = workspace:FindPartOnRay(TAGS, char) if hit then return true else return false end end end end you also might be able to use humanoid states to accomplish what you want to do if this does not work for you
naughty_RAT
#226823192Wednesday, October 25, 2017 11:53 PM GMT

If the ground is flat use magnitude, if it isn't use raycasting.
yoyo5724900
#226826112Thursday, October 26, 2017 1:09 AM GMT

Or you can check if a players Humanoid is jumping or not. Pretty simple tho

    of     1