this script just stops working once you die. no clue why tho
local player = game.Players.LocalPlayer
local character = player.Character
repeat wait()
character = player.Character
until character
local hum = character:WaitForChild("Humanoid")
local emote = hum:LoadAnimation(script.Parent.Emote)
playing = false
script.Parent.MouseButton1Click:connect(function()
if playing == false then
emote:Play()
hum.WalkSpeed = 0
hum.JumpPower = 0
playing = true
elseif playing == true then
emote:Stop()
hum.WalkSpeed = 30
hum.JumpPower = 60
playing = false
end
end)
its in a textbutton and in that same button theres an animation called "Emote"

4 comments
Does the script reload when the player dies? I.e is it in a GUI that has ResetOnSpawn to true?
it did not, thanks!
ok well, in that case, the issue is that you never re-define the character. Basically, the script is still looking at the old character that died. So you could simply fix this by adding a player.CharacterAdded part that auto updates the character variable
thanks