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

How do I make it so a button would change the Local Player's gui interface?

Asked by 3 years ago

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.

2 answers

Log in to vote
0
Answered by 3 years ago

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)
Ad
Log in to vote
0
Answered by 3 years ago

You could try a bindable event

Answer this question