this Script Work Just Fine In the Studio But it wont work On the Published game plz help ---this is a stats script By the Way
HC = script.Parent.Parent.CostHC -- this says How Much IT cost In the GUI
button = script.Parent
player = game.Players.LocalPlayer
count = script.Parent.Parent.HealthC -- this says The Current Health U Have
char = player.Character
humanoid = char.Humanoid
price = 75
Health = 100
max = false
button.MouseButton1Click:connect(function()
if humanoid.MaxHealth == 200 then
max = true
print("MaxHealth")
end
if player.leaderstats.Money.Value <= price then
print("Not enough")
elseif max == false then
humanoid.MaxHealth = Health
count.Text = count.Text + 1
Health = Health + 1
price = price + 25
HC.Text = price
player.leaderstats.Money.Value = player.leaderstats.Money.Value - price
wait(2)
end
end)
plz Help And, No the game is not Filtering Enabled

3 comments
Could It BE because I have Lots Of Scripts In the Same GUI, Do i Have to Put them Into 1?
Is it a local script, or a script? You can't identify "player" in a normal script.
its a Local script