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

How Do I Set A Remote Event For A Timer GUI To Activate?

Asked by 5 years ago

I have a game where I have a timer GUI that begins and appears when a certain value is true, I was wondering how I could make this a remote event so it'll happen on the server side of things rather than a client. Thanks! :)

1 answer

Log in to vote
0
Answered by 5 years ago

To achieve this, you first need to create a remote event. In this case, I will name the remote event RemoteEvent and put it in ReplicatedStorage.

Local Script:

1local event = game.ReplicatedStorage.RemoteEvent
2local number = --Enter the variable
3local value = --Enter the integer of the variable
4 
5if number == value then
6    event:FireServer()
7end

Server Script:

1local event = game.ReplicatedStorage.RemoteEvent
2local gui = --Insert gui name here
3 
4event.OnServerEvent:Connect(function(plr)
5    gui.Visible = true
6end)

If you have any questions post them on this thread.

0
If you need assistance with the timer GUI I might be able to help with that too. MasonJames136 21 — 5y
0
Where do I put the scripts? puppyfriend 0 — 5y
0
I would put the local script in the timer GUI and then the server script in a folder in the workspace. MasonJames136 21 — 5y
Ad

Answer this question