#animation doesn't play after I respawn

9 messages · Page 1 of 1 (latest)

maiden quartz
#

can anyone fix this and tell me what I should change or give me a new script please

drowsy blade
#

oh that is a common problem, I remember when I faced that lol

#

in my case the sprinting wouldnt work after the player died

#

to fix it, I needed to update the character everytime the character dies

#

for exmp

local function setupCharacter(character)
    local Humanoid = character:WaitForChild("Humanoid")
    local MainFrame = PlrGUI:WaitForChild("HUD"):WaitForChild("MainFrame")
    local StaminaDisplayTxt = MainFrame:WaitForChild("StaminaDisplayTxt")
    local BasicSpeed = Humanoid.WalkSpeed
    local Running = false```
#
local character = player.Character or player.CharacterAdded:Wait()
setupCharacter(character)

player.CharacterAdded:Connect(function(newCharacter)
    setupCharacter(newCharacter)
end)```
drowsy blade
#

so when the new character is added, it gets updated

#

simply put

The issue is that you're not updating the character when the player dies, since the old character renews you need to update the new one (sorry I suck at teaching, lmao)