I’m trying to detect whether or not the character is in the air or on the ground, however. Every time I try to do this it always say im on the ground when I’m very much higher then 3 studs in the air.
Video Attached showing that I’m well above 3 studs.
local player = game.Players.LocalPlayer
local Character = player.Character or player.CharacterAdded()
local HumRP = Character.HumanoidRootPart
local NewRaycastParams = RaycastParams.new()
NewRaycastParams.FilterType = Enum.RaycastFilterType.Exclude
NewRaycastParams.FilterDescendantsInstances = {Character, game.Workspace.SpawnLocationMain}
local direction = Vector3.new(0,-3,0)
local RayCast = workspace:Raycast(HumRP.Position, direction, NewRaycastParams)
if RayCast then
print("Ground")
end
if not RayCast then
print("Air")
end