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

Effect fades away when they buyer of my Game Pass died? [SOLVED]

This is a problem which my game pass effects wont last long when the buyer died. They will get the effect when they bought the pass, but it will fade away instantly when they died

game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
		local name = plr.Name
		if name then
			local check = game.Workspace:FindFirstChild(name)
			if check then
				checkHumanoid = check:FindFirstChild("Humanoid")
				if checkHumanoid then
					checkHumanoid.WalkSpeed = 16 * 2
				end
			end
		end
    end
end)

-- this do not work...
while checkHumanoid.WalkSpeed ~= 16 *2 do
	checkHumanoid.WalkSpeed = 16 *2
end

i already the Died event, still, it wont work, any answers?

1 answer

✓ Accepted answer

You want to use the plr.CharacterAdded event, and give them their walkspeed when they respawn after death. The reason your script isn't working is because when the player dies, their speed is set back to default when the respawn post-death.

1 comment

0

Oh, ok i reworked my Game Pass script, thanks for the help!

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