Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do you take away something using the died event? (SOLVED)

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.

1 answer

✓ Accepted answer

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.

2 comments

0

You not only answerd my question, but others in the future if i have n thanks to the link, thank you a bunch!

0

You're welcome, the wiki is always useful.

This discussion is preserved as it was. New answers, comments, and votes are closed.