What did I do wrong with this GUI code?
This is just a LocalScript inside a ScreenGUI, its in StarterGui and everything. I get no errors in the output, and the GUI disappears the second I am in the game.
please help
01 | local player = game.Players.LocalPlayer |
02 | local stats = player:FindFirstChild( 'leaderstats' ) |
03 | if not stats then return end |
05 | local rep = stats:FindFirstChild( 'Reputation' ) |
06 | if not rep then return end |
08 | local kills = stats:FindFirstChild( 'Kills' ) |
09 | if not kills then return end |
13 | script.Parent.Hydration.Bar.Size = script.Parent.Hydration.Bar.Size - UDim 2. new( 0 , 1 , 0 , 0 ) |
14 | if script.Parent.Hydration.Bar.Size ~ = UDim 2. new( 0 , 0 , 0 , 15 ) then |
16 | if script.Parent.Hydration.Bar.Size = = UDim 2. new( 0 , 0 , 0 , 15 ) then |
19 | player.Character.Humanoid.Health = game.Players.LocalPlayer.Character.Humanoid.Health - 6 |
20 | if kills.Value = = kills.Value + 1 then |
21 | player.Character.Humanoid.Health = game.Players.LocalPlayer.Character.Humanoid.Health + 6 |