so i did this script but i forget how to load animations help me pls.
local walkanim = "rbxassetid://9957775956"
local runanim = "rbxassetid://9957774022"
local Humanoid = script.Parent:WaitForChild("Humanoid")
local Animate = script.Parent:WaitForChild("Animate")
while true do
wait(0.5)
if Humanoid.WalkSpeed == 8 then
print("its 8")
if Animate.walk.WalkAnim.AnimationId == runanim then
Animate.walk.WalkAnim.AnimationId = walkanim
Humanoid:LoadAnimation(Animate.walk.WalkAnim)
else
print("its already walkanim")
end
else
print("its 16")
if Animate.walk.WalkAnim.AnimationId == walkanim then
Animate.walk.WalkAnim.AnimationId = runanim
Humanoid:LoadAnimation(Animate.walk.WalkAnim)
else
print("its already runanim")
end
end
end
local walkanim = "rbxassetid://9957775956"
local runanim = "rbxassetid://9957774022"
local RunAnimation = Instance.new("Animation")
local WalkAnimation = Instance.new("Animation")
RunAnimation.AnimationId = runanim
WalkAnimation.AnimationId = WalkAnimation
local Humanoid = script.Parent:WaitForChild("Humanoid")
local Animate = script.Parent:WaitForChild("Animate")
while true do
wait(0.5)
if Humanoid.WalkSpeed == 8 then
print("its 8")
local l = Humanoid:LoadAnimation(WalkAnimation)
l:Play()
else
print("its 16")
local l = Humanoid:LoadAnimation(RunAnimation)
l:Play()
end
end
it repeats animation so fast i changed to this but still don’t working
local walkanim = "rbxassetid://9957775956"
local runanim = "rbxassetid://9957774022"
local RunAnimation = Instance.new("Animation")
local WalkAnimation = Instance.new("Animation")
RunAnimation.AnimationId = runanim
WalkAnimation.AnimationId = walkanim
local Humanoid = script.Parent:WaitForChild("Humanoid")
local Animate = script.Parent:WaitForChild("Animate")
while true do
wait(0.5)
if Humanoid.WalkSpeed == 8 then
print("its 8")
if Animate.walk.WalkAnim.AnimationId == runanim then
local l = Humanoid:LoadAnimation(WalkAnimation)
l:Play()
else
print("Already Walking")
end
else
print("its 16")
if Animate.walk.WalkAnim.AnimationId == walkanim then
local l = Humanoid:LoadAnimation(RunAnimation)
l:Play()
else
print("its already running")
end
end
end
local walk = false
local run = false
local walkanim = "rbxassetid://9957775956"
local runanim = "rbxassetid://9957774022"
local RunAnimation = Instance.new("Animation")
local WalkAnimation = Instance.new("Animation")
RunAnimation.AnimationId = runanim
WalkAnimation.AnimationId = WalkAnimation
local Humanoid = script.Parent:WaitForChild("Humanoid")
local Animate = script.Parent:WaitForChild("Animate")
while true do
wait(0.5)
if Humanoid.WalkSpeed == 8 and walk == false then
walk = true
run = false
print("its 8")
local l = Humanoid:LoadAnimation(WalkAnimation)
l:Play()
elseif Humanoid.WalkSpeed == 16 and run == false then
walk = false
run = true
print("its 16")
local l = Humanoid:LoadAnimation(RunAnimation)
l:Play()
end
end
local walk = false
local run = false
local walkanim = "rbxassetid://9957775956"
local runanim = "rbxassetid://9957774022"
local RunAnimation = Instance.new("Animation")
local WalkAnimation = Instance.new("Animation")
RunAnimation.AnimationId = runanim
WalkAnimation.AnimationId = WalkAnimation
local Humanoid = script.Parent:WaitForChild("Humanoid")
local Animate = script.Parent:WaitForChild("Animate")
while true do
wait(0.5)
if Humanoid.WalkSpeed == 8 and walk == false then
walk = true
run = false
print("its 8")
local l = Humanoid:LoadAnimation(WalkAnimation)
l:Play()
elseif Humanoid.WalkSpeed ~= 8 and run == false then
walk = false
run = true
print("its 16")
local l = Humanoid:LoadAnimation(RunAnimation)
l:Play()
end
end
local walkanim = "rbxassetid://9957775956"
local runanim = "rbxassetid://9957774022"
local RunAnimation = Instance.new("Animation")
local WalkAnimation = Instance.new("Animation")
RunAnimation.AnimationId = runanim
WalkAnimation.AnimationId = walkanim
local Humanoid = script.Parent:WaitForChild("Humanoid")
local Animate = script.Parent:WaitForChild("Animate")
while true do
wait(0.5)
if Humanoid.WalkSpeed == 8 then
print("its 8")
local l = Humanoid:LoadAnimation(WalkAnimation)
l:Play()
else
print("its 16")
local l = Humanoid:LoadAnimation(RunAnimation)
l:Play()
end
end
Should work with code.
And Idle is Stop() animate.