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

I'm currently trying to create an EXP bar, but it's not really working out. How would I create one?

This is the script for the leaderboard that I want to use

local maxlevel = 100

game.Players.PlayerAdded:connect(function(player)
	local stats = Instance.new("IntValue", player)
	stats.Name = "leaderstats"
	
	local azteige = Instance.new("IntValue", stats)
	azteige.Name = "AZTEIGE"
	azteige.Value = 1
	
	local exp = Instance.new("IntValue", stats)
	exp.Name = "EXPERIENCE"
	exp.Value = 0
	
	local astex = Instance.new("IntValue", stats)
	astex.Name = "ASTEX"
	astex.Value = 100
	
	while wait() do
		local extralevel = azteige.Value
		local expneed = ((extralevel * 2) -1) * 200
		if azteige.Value < maxlevel then
			if exp.Value >= expneed then
				azteige.Value = azteige.Value + 1
				exp.Value = exp.Value - expneed
			end
		end
	end
end)

Here is a link of the GUI that I wanna use for this http://imgur.com/dEnQMbZ

1 comment

0

Can you show us the actual code you are having trouble with?

1 answer

I did not test but hopefully this helps!

while true do
wait()
local plr = game.Players.LocalPlayer
local stats = plr:WaitForChild('leaderstats')
local lvl = stats:WaitForChild('AZTEIGE')
local xp = stats:WaitForChild(EXPERIENCE')
local extralevel = azteige.Value
local expneed = ((extralevel * 2) -1) * 200

local math = xp.Value / expneeded
script.Parent[FRAME]:TweenSize(math,0,1,0),"Out", "Quad", .5)
end

1 comment

0

Accept if this helped?

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