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

Local Script in textlabel Wont update its display, even though it does for the other one?

So i made an EXP viewing script but it doesnt update? Like, when i level up it increased the exp you need to level up but it doesnt show that. It just shows "100 / 0 EXP"

It works for my other one that displays the level.

heres the script for exp:

local player = game.Players.LocalPlayer
local expLimit = 100 * (player.leaderstats.Level.Value) -- you start at level 1 btw

while true do
wait()
script.Parent.Text = expLimit.." / "..player.leaderstats.Experience.Value.." EXP"
end

1 answer

✓ Accepted answer

Variable must be inside the loop to reflect any value changes.

local player = game.Players.LocalPlayer

while true do
wait()
local expLimit = 100 * (player.leaderstats.Level.Value) -- you start at level 1 btw
script.Parent.Text = expLimit.." / "..player.leaderstats.Experience.Value.." EXP"
end

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