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.
✓ ANSWER ACCEPTED
How do I make it so a button would change the Local Player's gui interface?
2 answers
✓ Accepted answer
So, for this, I would suggest adding a remote event.
The general layout should look like this.
The click script should be the following:
script.Parent.ClickDetector.MouseClick:Connect(function(plr) -- On clicked
game.ReplicatedStorage.ShowGui:FireAllClients() -- Fires to all clients
end)
This notifies every client that the button has been pressed.
The LocalScript should be the following:
game.ReplicatedStorage.ShowGui.OnClientEvent:Connect(function()
-- WHATEVER YOU WANT TO HAPPEN WHEN BUTTON IS CLICKED HERE
script.Parent.Enabled = true
wait(4)
script.Parent.Enabled = false
end)
You could try a bindable event
This discussion is preserved as it was. New answers, comments, and votes are closed.
