Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Custom Health GUI help?

Asked by 10 years ago

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

Log in to vote
0
Answered by
Xianon 105
10 years ago

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


Ad
Log in to vote
-1
Answered by
KAAK82 16
10 years ago

check my Model on Roblox... Here it's so Simple! :D

Answer this question