Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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

2 answers

Log in to vote
0
Answered by 5 years ago

It's hard to give you a technical answer if you don't tell us how much you already know.

Have you covered the basics?

Have you ever created a GUI where you could click it and it would do something?

You need to show some effort before we can help you!

Ad
Log in to vote
0
Answered by 5 years ago

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

Answer this question