Hey, I'm making a game and I want to know: how can you take away something using the died event? Like a walkspeed boost then take it away if they died? Thanks!
P.S Hers what I think this would be like
Local SpeedBonus = SB Humanoid.walkSpeed.SB = 1.25 game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() Humanoid.walkspeed = 1.25 end) end) end)
I don't think it's right, but I gave it my all.
When a character dies, the walkspeed is reset to the default, 16. What you need to do is change it when it spawns, the wiki has a script showing it.