local StarterGui = game:GetService('StarterGui') StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false) local player = game.Players.LocalPlayer local character = player.Character local humanoid = character.Humanoid local mainframe = script.Parent.Main local hpBar = mainframe.Health local playerName = mainframe.PlayerName local gui = script.Parent local image = mainframe.PlayerImage playerName.Text = player.Name image.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=".. player.Name humanoid.HealthChanged:connect(function() local hpMath = humanoid.Health / humanoid.MaxHealth hpBar.Size = UDim2.new(hpMath,0,0.25,0) end)
None of it happens. I don't know why.
Thanks in advance!
Is this in a local script? - If not, you can't access LocalPlayer through a server script.
When going down the hierarchy, try using ":WaitForChild()". For example:
local humanoid = character:WaitForChild("Humanoid")