Board Thread:ROBLOX help and discussion/@comment-26257480-20170311230620

Tired of my weak skills on scripting, I decided to make my first hand-made script : A text button which set your max health to 1000. This is important for me because its the missing feature of a loadout gui Im developping for my FPS Project.



I request help because it wont work. The problem is the function, but I attempt to determinate what is wrong. The current script work like this :



player = game.Players.LocalPlayer



function onClicked(textButton)

local Stamina = player.Humanoid:GetState("MaxHealth"):ChangeState("MaxHealth")

Stamina.value = 1000





script.Parent.Parent.Parent.Frame1.Visible = false

script.Parent.Parent.Parent.Frame2.Visible = false

script.Parent.Parent.Parent.Frame3.Visible = false

script.Parent.Parent.Parent.Frame4.Visible = false

end

<p style="font-weight:normal;font-size:16px;">

<p style="font-weight:normal;margin-top:0px;margin-bottom:0px;font-size:16px;">script.Parent.MouseButton1Down:connect(onClicked)

<p style="font-weight:normal;margin-top:0px;margin-bottom:0px;font-size:16px;">

<p style="font-weight:normal;margin-top:0px;margin-bottom:0px;font-size:16px;">Please note it is Local script because the initial script ( to give guns ) was operational as Local Script. <ac_metadata title="Scripting help request"> </ac_metadata>