I’m making a jump-power boosting potion for my game and it inserts this script into the workspace that has a value that is equal to the user of the potion:
print("test") -- does print so I know the script is running
local player = script.LinkedPlayer.Value
local Char = player.Character
local Hum = Char:FindFirstChild("Humanoid")
Hum.Died:Connect(function()
script:Destroy()
end)
Hum.JumpPower = 80
local ParticleEmitter = script.ParticleEmitter:Clone()
ParticleEmitter.Parent = Char.HumanoidRootPart
ParticleEmitter.Enabled = true
wait(20)
Hum.JumpPower = 50 -- resets after 20 seconds
ParticleEmitter:Destroy()
script:Destroy()
I get no errors, but after I jump once, the Jumppower resets back to 50. How do I make it so it permanently stays as 80 until I reset it?