I am making a game, and I need a health bar to lower when the player gets damaged. The code I've been trying is:
local Frame = script.Parent.Frame.Frame
local player = game.Players.LocalPlayer.Character
player:WaitForChild("Humanoid"):GetPropertyChangedSignal("Health"):Connect(function()
Frame.Size.X.Offset = player.Humanoid.Health*3.45
end)
It doesn't work, if you have a solution, I would be glad if you shared it with me, Thanks in advance.

5 comments
This doesn't seem to work.
Try now, I edited the script
Still nothing. Sorry for the late response, I was kind of busy.
I edited it again, now it will work, I tested
It works now, Thank you very much!