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

How would i script a Experience bar?

Asked by
Zyleak 70
9 years ago

I'm making an exp bar gui but I don't know how I would get it to work, i have values for Current Exp and Required Exp. I'm unsure how I would do it from here?

1 answer

Log in to vote
0
Answered by 9 years ago
Player = game.Players.LocalPlayer
MaxXP = Player.RequiredXP
CurrentXP = Player.CurrentXP

CurrentXP.Changed:connect(function()
Gui:TweenSize(UDim2.new(CurrentXP.Value/MaxXP.Value, 0, 1, 0), "Out", "Linear", 0.1, true)
end)

I may have gotten the division signs the wrong way round. If it doesn't work, just swap them.

0
Well, this isn't a request site, delete the answer, because the point of Scripting Helpers is to have a broken script and have someone debug it for you, it isn't about making a script for someone. EzraNehemiah_TF2 3552 — 9y
Ad

Answer this question