Hello, so I'm trying to understand how GUI's work, but it's giving me somewhat of a headache. I'm trying to make a script that fetches player health & fills for example a stamina icon. How would I go about this? Do I have to make 100 seperate decals?
COMMUNITY QUESTION
How to make a health GUI that fills up?
1 answer
No you do not have a simple script ready for i have made a few months ago!
wait()
local Player = game:GetService'Players'.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Human = Character:WaitForChild("Humanoid")
local HealthFrame = script.Parent
Human.HealthChanged:connect(function(Health)
HealthFrame.Size = UDim2.new(Health/Human.MaxHealth,0,1,0)
end)
make a frame in your GUI and call it Background make the color red and then make a Frame called Positive Then inside it put a local script with the script above also can you show your attempted script maybe more people will help you with it to understand what you are attempting
This discussion is preserved as it was. New answers, comments, and votes are closed.
