local bullet= game.ServerStorage.FallingSFX local bulletClone= bullet:Clone() bulletClone.Parent= script.Parent.Torso while true do wait() if script.Parent.Humanoid.FreeFalling==true then script.Torso.FallingSFX.Playing=true script.Parent.Humanoid.WalkSpeed=script.Parent.Humanoid.WalkSpeed+10 wait(0.25) script.Parent.Humanoid.WalkSpeed=script.Parent.Humanoid.WalkSpeed-10 print("Print") end end while true do wait() if script.Parent.Humanoid.FreeFalling==false then script.Torso.FallingSFX.TimePosition=0 script.Torso.FallingSFX.Playing=false print("Print2") end end
Correct code:
while true do wait() if (script.Parent.Humanoid.FloorMaterial == Enum.Material.Air) then print("They're in the air") else print("They're on the ground") end end
You can use the FloorMaterial property of Humanoid:
local plr = game.Players.PlayerName while true do wait(1) if (plr.Character.Humanoid.FloorMaterial == Enum.Material.Air) then print("They're in the air") else print("They're on the ground") end end