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

How do I make a gui disappear on click (for all players too?)

I havent tried anything because i have no clue how to do this or how roblox works pls help

2 answers

This may be a bit hard for you to understand since you said that you don't know anything about roblox but ill just post my response instead

In a Local Script:

TextButton.MouseButton1Down:Connect(function()
	RemoteEvent:FireServer()
end)

Now in a Server Script:

local PlayerService = game:GetService('Players')

RemoteEvent.OnServerEvent:Connect(function(player)
	for i, player in pairs(PlayerService:GetChildren()) do
		player.PlayerGui.ScreenGui.Enabled = false
	end
end)

if you don't understand most of what is happening, then i recommend you learn about Remote Events, Filtering Enabled, In pairs loops, and Player Gui events

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