local Animation = Instance.new("Animation", plr.Character)
local Humanoid = plr.Character:WaitForChild("Humanoid")
Animation.AnimationId = "rbxassetid://6549269819"
Animate = Humanoid:LoadAnimation(Animation)
Animate.Looped = false
function emote()
if emoting == false then
emoting = true
Animate:Play()
plr.CameraMode = Enum.CameraMode.Classic
Humanoid.WalkSpeed = 0
Humanoid.JumpPower = 0
controls:Disable()
togglevis()
Animate.Stopped:Wait() -- Wait until animation ends
controls:Enable()
Animate:Stop()
Humanoid.WalkSpeed = 30
Humanoid.JumpPower = 20
plr.CameraMode = Enum.CameraMode.LockFirstPerson
emoting = false
togglevis()
end
end
When animation ends Humanoid.WalkSpeed = 30
and below works fine
except Animate:Stop() it’s not working how to fix that?