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

Why will this script not function when it's in a LocalScript?

Asked by
TheePBHST 154
6 years ago
Edited 6 years ago

I'm trying to make this script change everyone's UI text. No errors from output either and it is in LocalScript

Code


local pluir = game.Players.LocalPlayer.PlayerGui plrui.SpeakerUI.Background.Speaker.Text = "Teacher" plrui.SpeakerUI.Background.Mesage.Text = "Welcome to class kids! We will be taking the ROBLOXian test of 2009. I hoped you slept early and had a good breakfest to start the day. I'll be reading the rules in a moment after announcements."

1 answer

Log in to vote
0
Answered by 6 years ago

I'd try adding a wait for character at the top


local plr = game.Player.LocalPlayer repeat wait() until plr.Character local pluir = game.Players.LocalPlayer.PlayerGui plrui.SpeakerUI.Background.Speaker.Text = "Teacher" plrui.SpeakerUI.Background.Mesage.Text = "Welcome to class kids! We will be taking the ROBLOXian test of 2009. I hoped you slept early and had a good breakfest to start the day. I'll be reading the rules in a moment after announcements."
Ad

Answer this question