the script woks On studio But it wont Work On The published game
repeat wait() until game.Players.LocalPlayer
and game.Players.LocalPlayer.Character
local player = game.Players.LocalPlayer
char = player.Character
hum = char.Humanoid
button = script.Parent
count = script.Parent.Parent:WaitForChild("CostHC")
HC = script.Parent.Parent:WaitForChild("HealthC")
price = 75
UP = false
max = 200
button.MouseButton1Click:connect(function()
local hum = char.Humanoid
if hum.MaxHealth == max then
elseif player.leaderstats.Money.Value <= price then
elseif UP == false then
hum.MaxHealth = hum.MaxHealth + 1
player.leaderstats.Money.Value = player.leaderstats.Money.Value - price
price = price + 25
count.Text = price
HC.Text = HC.Text + 1
end
end)
at firs i Was getting an error saying Player attempted to index(nil value) i think that was the error it gave me, bu now i get no output plz he thx :)

3 comments
is this in a regular script
If it is a regular script, then read my bio.
ok it Was