I'm trying to make a tribe system, and I want to know how to make everyone see something turn visible when a button is pressed.
So, for this, I would suggest adding a remote event.
The general layout should look like this.
The click script should be the following:
1 | script.Parent.ClickDetector.MouseClick:Connect( function (plr) -- On clicked |
2 | game.ReplicatedStorage.ShowGui:FireAllClients() -- Fires to all clients |
3 | end ) |
This notifies every client that the button has been pressed.
The LocalScript should be the following:
1 | game.ReplicatedStorage.ShowGui.OnClientEvent:Connect( function () |
2 | -- WHATEVER YOU WANT TO HAPPEN WHEN BUTTON IS CLICKED HERE |
3 | script.Parent.Enabled = true |
4 | wait( 4 ) |
5 | script.Parent.Enabled = false |
6 | end ) |