Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How Exactly to add value?

Asked by 5 years ago

Im making a game that if you click the UI button, your max health will increase + 1, but how can i add it?

i tried

local button = script.Parent
local player = game.Players.LocalPlayer
local char = player.Character

button.MouseButton1Click:Connect(function(plr)
    char.Humanoid.MaxHealth + 1
end)

But doesnt work, im new at scripting so i barely know anythin

1 answer

Log in to vote
0
Answered by
unmiss 337 Moderation Voter
5 years ago
Edited 5 years ago
char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 1
0
you should give a small explanation EpicMetatableMoment 1444 — 5y
0
ye Trollapse 89 — 5y
0
Thanks so much! i wish i could upvote Minecrafter09031031 16 — 5y
0
wait did this just worked via a localscript WikiBaseHealthFinder 40 — 5y
Ad

Answer this question