How can I fix this issue with my code?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
  • I want this remote event to be fired but not pause the rest of the code
  1. What is the issue?
  • the code keeps pausing at line 18, as it does fire the remote event but it refuses to do anything further
    Screenshot 2024-02-13 170613
--Variables
local rep = game:GetService("ReplicatedStorage")
local EventTime = rep.EventTime
local IntermissionTimeEvent = rep.IntermissionTimeEvent
local lighting = game:GetService("Lighting")
local	EventStorage = lighting.RandomEvents:GetChildren()
local GUI = game:GetService("StarterGui").RoundTwist
local SpecialEventRoundGUIShower = rep.SpecialEventRoundGUIShower
local SpecialEventRoundGUIHider = rep.SpecialEventRoundGUIHider

--PickingRandomEvent
while true do
	wait(IntermissionTimeEvent.Value)
local EventChosen =	EventStorage[math.random(1, #EventStorage)]
	print(EventChosen)
	EventChosen.Parent = game.Workspace
	GUI.Enabled = true
	SpecialEventRoundGUIShower:FireClient() --Heres the error
	wait(EventTime.Value)
	SpecialEventRoundGUIHider:FireClient()
	GUI.Enabled = false
	EventChosen.Parent = game.Lighting.RandomEvents
end

Extra Images
Screenshot 2024-02-13 170724

RemoteEvent:FireClient() needs a player object passed to it so the server knows which client has to fire the event. If you want the RemoteEvent to trigger on all clients, use RemoteEvent:FireAllClients().

1 Like

pretty sure you need to define the player.

1 Like

change FireClient() to :FireAllClients()

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.