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

How would i script a Experience bar?

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

✓ Accepted answer
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.

1 comment

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.

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