Animation plays at first but when I reset/respawn it doesn't load the animation.. Any help would be appreciated.
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local Animator = Humanoid:WaitForChild("Animator")
local emote = Animator:LoadAnimation(script.Parent.Emote1)
Player.CharacterAdded:Connect(function(Char)
Character = Char
Humanoid = Char:WaitForChild("Humanoid")
HumanoidRootPart = Char:WaitForChild("HumanoidRootPart")
end)
playing = false
script.Parent.MouseButton1Click:Connect(function()
if playing == false then
emote:Play()
Humanoid.WalkSpeed = 0
Humanoid.JumpPower = 0

1 comment
I forgot to say it's inside of a gui, I just wanted to make a if you click the button inside the gui it plays.