local human = game:GetService("Players")
script.Parent.MouseClick:Connect(function(player)
local getCookies = player.leaderstats.Points
if getCookies.Value == getCookies.Value then
getCookies.Value = getCookies.Value + 1
end
if getCookies.Value <= 10 then
return
end
if getCookies.Value > 10 then
local chr = human:GetPlayerFromCharacter(player)
local humanoid = chr.Humanoid
if humanoid then
humanoid.Health = 0
end
end
end)
So I'm trying to make so that when you click on a 'Part', it will do nothing but give you points UP UNTIL you hit 10+, if u hit 11 points you will die.
How do I correct this error?

1 comment
thank you!