so Iv’e developed a game with boosts, 2 in particular are jumppower and walkspeed boosts. Whenever a player enables it, I scripted it to work but, if they die, I wanted the boost to be activated still when they respawn.
I tried in a script, trying to give the player their current walkspeed/jumppower boost whenever their character is added, also using RemoteEvents.
Gui button for boost.
local buy = script.Parent
local Enable = “Enable”
local Disable = “Disable”
local function Boost()
if buy.Text == Enable then
buy.BackgroundColor3 = Color3.new(255,85,0)
buy.Text = Disable
elseif buy.Text == Disable then
buy.BackgroundColor3 = Color3.new(0,255,0)
buy.Text = Enable
if script.Parent.Text == Disable then
I put this script in StarterCharacterScripts and did script.parent.Humanoid to reference a player’s humanoid, doing it any other way just didn’t work.
local function Walkspeed1()
script.Parent.Humanoid.WalkSpeed = script.Parent.Humanoid.WalkSpeed +10
It works but, it affects all Players, I don’t know how make it so that it affects the player activating the boost.