Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Custom Health GUI help?

So, I'm currently trying to script my own custom Health GUI so that when the player gets damaged, the frame's width gets subtracted by 1. Here's the code I'm using for the GUI.

local sp = script.Parent
local health = game.Players.humanoid.health
local gooey = game.StarterGui.Frame.Size

if sp.health == math(100, -1) then
	gooey.math(-12, -1)
end

Is this the correct method to use for this kind of situation? Or should I try doing this differently?

2 answers

Make the Frame Canvas X Axis by 100 or a number that you can divide by 100.

local sp = script.Parent
local health = game.Players.Name.humanoid.health
local gooey = game.StarterGui.Frame.Size

goey.UMdi2.new(health,0) -- I don't know either if the "health" can be a variable for the X axis--

end


This discussion is preserved as it was. New answers, comments, and votes are closed.