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

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

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

✓ Accepted answer

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."

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