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

{LEGIT HELP} Why isn't my TextLabel changing?

Asked by 8 years ago

Ok, this is actually a legit question, but I created a script that changes the text of a TextLabel, here is what I have.

print("BARBARIAN59's MainScript Is Starting To Load!")
local statusbar = game.StarterGui.MainGui.MainFrame.StatusBar --StatusBar is TextLabel

while true do
    statusbar.TextColor3 = Color3.new(255, 255, 255)
    statusbar.Text = "Loading A New Map!"
    wait(3)
    statusbar.TextColor3 = Color3.new(255, 255, 255)
    statusbar.Text = "Finished!"
    wait(1)
end

I can't really find the error in this, can anyone help?

So here would be an example of what it would do.

Loading A New Map!

waits 3 seconds

Finished!

But it just stays at Loading A New Map!

1 answer

Log in to vote
0
Answered by 8 years ago

It needs to be accessed from the PlayerGui, so this has to be in a local script vvvvvvv

print("BARBARIAN59's MainScript Is Starting To Load!")
local statusbar = game.Players.LocalPlayer.PlayerGui.MainGui.MainFrame.StatusBar --StatusBar is TextLabel

while true do
    statusbar.TextColor3 = Color3.new(255, 255, 255)
    statusbar.Text = "Loading A New Map!"
    wait(3)
    statusbar.TextColor3 = Color3.new(255, 255, 255)
    statusbar.Text = "Finished!"
    wait(1)
end


This should fix it, if not please inform me.

Ad

Answer this question