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

Is it possible for the gui to be cloned in startergui and be visible for everyone?

How would it be possible to clone it in playergui and startergui when you click the button?

i want it to be visible for everyone as well

tysm for ur assistance


script.Parent.sh.MouseButton1Click:Connect(function()

	
	
	
	
	local guiobject = script.Parent.Parent.Game
	local guiclone = guiobject:Clone()
	guiclone.Parent = script.Parent
	guiclone.Name = “yeet”
	guiclone.Visible = true
	guiclone.Visible = false
	print(“yeet")
	end)


3 comments

0

Are you sure you want it in startergui instead of just every players "PlayerGui"? Putting the gui in starter gui means that the players have to respawn to see it.

0

oh

0

every player in playergui then

1 answer

✓ Accepted answer

You would have to do it in a Server Script and run it through every player because doing it in a Local Script would only clone it locally. Here would be an example:

-- Server Script --

local button = script.Parent
local gui = button.Parent

button.MouseButton1Click:Connect(function()
	for _,v in pairs(game.Players:GetPlayers()) do
		local clone = button:Clone()
		clone.Position = button.Position + UDim2.new(0,10,0,10)
		clone.Parent = v.PlayerGui[gui.Name]
	end
end)

1 comment

0

I’ll take a look.

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