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

Why is this script that configures a GUI inside players not working?

This script is supposed to update the text inside a certain GUI for all players. However, the script doesn't work at all, and output gave me nothing.

Can someone please help me?

Here's the script:

local player = game.Players:getPlayers()
for i = 1, #player do
	player[i].PlayerGui.Notifier.Frame.Text.Text = "Starting up a new game, please wait..."
end

1 answer

✓ Accepted answer

I'm not sure if this would work in your case, but instead of using for i = 1, #player, try doing this code

local player = game.Players:GetChildren() --Getting the "physical" object
for i,v in pairs(player) do 
	v.PlayerGui.Notifier.Frame.Text.Text = "Starting up a new game, please wait..."
end

2 comments

0

Both solutions work, they're just different ways of doing it. Also, "game.Players:GetPlayers()" is to be prefered over "game.Players:GetChildren()".

0

Thanks!

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