db = true
cooldown = script.Parent.Cooldown
Kaioken = script.Parent
local player = game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")
Kaioken.MouseButton1Down:Connect(function()
if db == true then
player.MaxHealth.Value = player.MaxHealth.Value +5
player.Walkspeed.Value = player.Walkspeed.Value +5
wait (5)
player.MaxHealth.Value = player.MaxHealth.Value -5
player.Walkspeed.Value = player.Walkspeed.Value -5
db = false
cooldown.Text = "Cooldown: 5"
wait (1)
cooldown.Text = "Cooldown: 4"
wait (1)
cooldown.Text = "Cooldown: 3"
wait (1)
cooldown.Text = "Cooldown: 2"
wait (1)
cooldown.Text = "Cooldown: 1"
wait(1)
cooldown.Text = "Cooldown: 0"
db = true
end
end)
Thats my script I use and it says attempt to index upvalue 'player' (a nil value) Help meh plz

4 comments
The character was not loaded by the time the script ran
Additionally, you can use a for loop in lines 15 through 25. Also use local variables
How is the character not loaded
I still dont understand