I've attempted it for hours but can't figure it out. This is one of my many attempts, obviously its wrong. Just trying to find a way.
local newstate = player.Character.Humanoid:GetState() while newstate == 0 do newstate = player.Character.Humanoid:GetState() if newstate == 7 then player.Character.UpperTorso.Trail.Enabled = false player.Character.LowerTorso.Trail.Enabled = false player.Character.Head.Trail.Enabled = false player.Character.LeftUpperArm.Trail.Enabled = false player.Character.LeftLowerArm.Trail.Enabled = false player.Character.LeftHand.Trail.Enabled = false player.Character.LeftUpperLeg.Trail.Enabled = false player.Character.LeftLowerLeg.Trail.Enabled = false player.Character.LeftFoot.Trail.Enabled = false player.Character.RightUpperArm.Trail.Enabled = false player.Character.RightLowerArm.Trail.Enabled = false player.Character.RightHand.Trail.Enabled = false player.Character.RightUpperLeg.Trail.Enabled = false player.Character.RightLowerLeg.Trail.Enabled = false player.Character.RightFoot.Trail.Enabled = false print'Hit Ground' end end
Any form of help towards this, even just a hint would be greatly appreciated
just use the Humanoid.StateChanged
event..
local Humanoid = --the humanoid; Humanoid.StateChanged:Connect(function(oldState, newState) if(newState == enum.HumanoidStateType.Landed) then print("player just landed!") end end)
I figured out how to do this, very sorry again for answering my own question!
In While Statements do Humanoid:GetState() ~= Enum.HumanoidStateType.Landed In If Statements do Humanoid:GetState() == Enum.HumanoidStateType.Landed
It might work the other way around to, but this solved my problem.