I Wanted To Know How To Commas To The EXP Gui
And It Was Bothering Me
Here’s How The Gui Looks Like
local player = game.Players.LocalPlayer
local level = player:WaitForChild("Level")
local current = level:WaitForChild("Current")
local max = level:WaitForChild("Max")
-- UI-related variables.
local gui = script.Parent
local exterior = gui:WaitForChild("Exterior")
local label = exterior:WaitForChild("Label")
local exp = exterior:WaitForChild("Exp")
local bar = exterior:WaitForChild("Bar")
-- Change stats upon join.
label.Text = "Level "..level.Value
exp.Text = current.Value.."/"..max.Value.." EXP"
bar.Size = UDim2.new(current.Value/max.Value, 0, 1, 0)
level.Changed:Connect(function(val)
label.Text = "Level "..level.Value
exp.Text = current.Value.."/"..max.Value.." EXP"
bar.Size = UDim2.new(current.Value/max.Value, 0, 1, 0)
game.Workspace["LevelUp"]:Play()
end)
current.Changed:Connect(function(val)
exp.Text = current.Value.."/"..max.Value.." EXP"
bar.Size = UDim2.new(current.Value/max.Value, 0, 1, 0)
end)
If You Know How, Please Let Me Know-How