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

How would I make a server script put a gui and frame into all players player gui?

I put a script in serverscriptservice, that is only putting the gui and frame in that players player gui, that the event fired from. Do I need to change it, or use something else? Code:

local remote = game.ReplicatedStorage.OpenEvent
remote.OnServerEvent:Connect(function(player)
player.PlayerGui:WaitForChild("CreatingLobbyGui")
local LobbyCopy = game.Lighting.LobbyGui:Clone()
LobbyCopy.Parent = player.PlayerGui
local LobbysCopy = game.Lighting.Frame:Clone()
LobbysCopy.Parent = player.PlayerGui.ActiveLobbys.Frame.Frame

end)

1 comment

0

I also might be afk for a bit.

1 answer

✓ Accepted answer

Guy that removed his wont work.

local remote = game.ReplicatedStorage.OpenEvent
remote.OnServerEvent:Connect(function() --Client sending request to server to show all guis

	for i, v in pairs(game.Players:GetPlayers()) do
		local LobbyCopy = game.Lighting.LobbyGui:Clone()
		LobbyCopy.Parent = v.PlayerGui
		local LobbysCopy = game.Lighting.Frame:Clone()
		LobbysCopy.Parent = v.PlayerGui.ActiveLobbys.Frame.Frame
	end
end)

3 comments

0

Thanks, thats working.

0

I've been looking for something like this for a while

0

Also, you should say guy below now, lol.

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