Trying to make 2 scripts server sided but both rely on remote events, forcing one to be local

Currently I’m trying to trigger remote events. When a new server is created I want to wait 10 seconds and then fire a remote event. Then after 60 seconds another remote event will be fired.
Currently in order to do that I would need to make one script a local script however I think that might cause problems.
Script that I want to fire once when a new server is created by a player joining a new server:

local event = game.ReplicatedStorage.Intermission

task.wait(10)
event:FireAllClients()

Script I want to come after that: (The other options are placeholders.)

local games = game.ReplicatedStorage.Minigames:GetChildren()
local randomGame = math.random(1, #games)
local event = game.ReplicatedStorage.Intermission
local minigame = game.Workspace.ChosenMinigame.Minigame

local function IntermissionTime()
	if randomGame == 1 then
		minigame.Name = "Tower Climb"
		task.wait(60)
		game.ReplicatedStorage.Minigames["Tower Climb"]:FireAllClients()
	elseif randomGame == 2 then
		minigame.Name = "Tower Climb"
		task.wait(60)
		game.ReplicatedStorage.Minigames["Tower Climb"]:FireAllClients()
	elseif randomGame == 3 then
		minigame.Name = "Tower Climb"
		task.wait(60)
		game.ReplicatedStorage.Minigames["Tower Climb"]:FireAllClients()
	end
end

event.OnServerEvent:Connect(IntermissionTime)

Is there a way for both scripts to be server sided or for the first script to only fire the one time? As far as I know FireAllClients() and FireClient() can only be used in a normal script and trigger local scripts and FireServer() can only be used in a local script and trigger normal scripts.

Assuming you want 2 server sided script to communicate each others, BindableEvent would suit your way in this case

It’s infact similar to RemoteEvents except you’ll have to use it in the same type of scripts like server > server or client > client.

1 Like