I have created a health bar GUI in the StarterGui, but the script is not working. The LocalScript is inside the frame that changes size. In the output in says "Offset cannot be assigned to" . :(
LocalScript:
local bar = script.Parent
local player = game.Workspace:WaitForChild(game.Players.LocalPlayer.Name)
local health = player.Humanoid.health
while true
do
bar.Size.X.Offset = Vector2.new(health)
wait(0.1)
end
Thanks, blocky010101

3 comments
plyr:WaitForChild("Humanoid").Health i recomend.
That's still wrong. Numbers don't have changed events. And the Humanoid is in the character, not the player.
sorry im late, does not work.