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

How to make command seable to all players?

So if I clone a Gui and move it to startergui, that Gui will only show to the certain player that requested it, like with MouseButton1Click. In my situation, how would I make it so ever would would see it? Would I have to switch from localscript to normal scripts?

Button.MouseButton1Click:connect(function()
	local Gui = script.Gui:Clone()
	Gui.Parent = game.ScreenGui
end

2 comments

0

...wut?

0

ask the question more SPECIFICALLY please.

1 answer

Well, you MUST use a LocalScript. And PLEASE do not do :connect and it's :Connect

Anyways, here is the script remade. You're welcome.

local plr = game:GetService("Players").LocalPlayer

script.Parent.MouseButton1Click:Connect(function() -- assuming its a TextButton, and the Localscript inside it
    local clone = game:GetService("ReplicatedStorage").Gui:Clone() -- I put it in replicatedstorage because it's a good place for storage.
    clone.Parent = plr.PlayerGui -- You replicate Gui objects through a players playergui.
end)

4 comments

0

what's wrong with using :connect

0

They still do the same thing. There is nothing wrong using :connect(). It still functions correctly.

0

:connect is deprecated

0

this is wrong, i see it gets placed into the only the plr's playergui, not the enitre server's

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