Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How Exactly to add value?

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

char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 1

4 comments

0

you should give a small explanation

0

ye

0

Thanks so much! i wish i could upvote

0

wait did this just worked via a localscript

This discussion is preserved as it was. New answers, comments, and votes are closed.