local player = game.Players.LocalPlayer
repeat wait() until player.Character
local char = player.Character
local hum = char.Humanoid
local running = false
local UIS = game:GetService("UserInputService")
local ToggleSusan = game.ReplicatedStorage:WaitForChild("ToggleSusan")
UIS.InputBegan:Connect(function(Input, Chat)
if Input.KeyCode == Enum.KeyCode.E and not Chat and hum.Health >= 1 then
if running == false then
ToggleSusan:FireServer(true)
local Anim = Instance.new('Animation')
Anim.AnimationId = script.Idle.AnimationId
PlayAnim = char.Humanoid:LoadAnimation(Anim)
PlayAnim:Play()
running = true
elseif running == true then
ToggleSusan:FireServer(false)
PlayAnim:Stop()
running = false
elseif running == true then
if hum.walkspeed > 0 then
PlayAnim:Stop()
end
end
end
end)
so this is what i did, u see and the buttom i tried it so when the Walkspeed is bigger than 0 the animation stop but it doesn't do anything any help is apreaciated
