local ListOfIgnoredObjects = {}
for _, Object in next, workspace.CurrentMap:GetDescendants() do
if Object:IsA"BasePart" and not Object.CanCollide then
table.insert(ListOfIgnoredObjects, Object)
end
end
for _, Object in next, Humanoid.Parent:GetChildren() do
if Object:IsA"BasePart" then
table.insert(ListOfIgnoredObjects,Object)
end
end
local HRPPos = HumanoidRootPart.Position
print((HRPPos-(workspace:Raycast(HRPPos,DownwardVector,RaycastParams.new(ListOfIgnoredObjects,Enum.RaycastFilterType.Blacklist))).Position).Magnitude)
It printed some value that is a bit too low, when in fact the distance between the player and the ground at least 30 studs
DownwardVector is a constant with the value Vector3.new(0,-1,0)