I am trying to make a breathing script where if the player is walking it would make a breathing particle every one second the problem is that Humanoid:GetState() is returning "Running" even though the player is standing still or vise versa. This is the script I used so you can see if there are any problems inside of it, It is a serverscript placed inside serverscript service
local BreathingParticle = game.ReplicatedStorage.BreathingParticle
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(Char)
local Head = Char:WaitForChild("Head")
local Hum = Char.Humanoid
local Particle = BreathingParticle:Clone()
Particle.Rate = 0
Particle.Parent = Head.FaceFrontAttachment
repeat
if Hum:GetState() == Enum.HumanoidStateType.Running then -- Problem here
print(Hum:GetState())
Particle:Emit(1)
end
wait(1)
until false
end)
end)
someone please help!! its very annoying
