I am making a game with my friends and since most people are busy, I am having to do almost everything coding related even though I am not very good at it.
I am trying to make some kind of GUI Health bar, and I wrote a script with the purpose of making a frame smaller on the X-axis when the health lowers. However, the script doesn't work and I don't know why.
local Frame = script.Parent.Frame.Frame.Size.X
local playerHP = game.Players.LocalPlayer.Character.Humanoid.Health
while playerHP > 0 do
Frame = playerHP*3.45 -- Multiplier is 3.45 because that's the size of the frame
end
I also need help with making the GUI visible to each player individually, so that when someone else takes damage, the other players' health bar doesn't change.
Thanks in advance.

2 comments
Frame = UDim2.new(0,playerHP*3.45)... try that maybe?
try my script again