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! :)
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:
1 | local event = game.ReplicatedStorage.RemoteEvent |
2 | local number = --Enter the variable |
3 | local value = --Enter the integer of the variable |
4 |
5 | if number = = value then |
6 | event:FireServer() |
7 | end |
Server Script:
1 | local event = game.ReplicatedStorage.RemoteEvent |
2 | local gui = --Insert gui name here |
3 |
4 | event.OnServerEvent:Connect( function (plr) |
5 | gui.Visible = true |
6 | end ) |
If you have any questions post them on this thread.