Fire is not a valid member of RBXScriptConnection

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")

local LobbySpawn = game.Workspace:WaitForChild("SpawnLocation")

local MapsFolder = ServerStorage:WaitForChild("Maps")
local Maps = {MapsFolder:WaitForChild("Map4")}

local selectedMap = Maps[math.random(1, #Maps)]
local map = selectedMap:Clone()

local StringValue = game.Workspace:WaitForChild("Time")
local InLobby = game.Workspace:WaitForChild("InLobby")
local InGame = game.Workspace:WaitForChild("InGame")

local function Intermission()
	for i = 5, 0, -1 do
		local plr = game.Players:GetPlayers()
		StringValue.Value = "Players in queue: " .. #plr -- Intermission time
		task.wait(1)
	end
-- set these values after the for loop, do not need to check i == 0
	InLobby.Value = false -- No longer in lobby
	InGame.Value = true -- In game
end 

script.Parent.Intermission.Event:Connect(Intermission):Fire()

Getting an error saying “Fire is not a valid member of RBXScriptConnection” if anyone can help it would be much appreciated trying to make a minigame system with events.

It is in a ServerScript btw and the events are in ServerScriptService

The :Fire() after the event line shouldn’t be there. That alone without it should do it.

Thank you will test it out now cheers :+1:

Still not firing unfortunately

If you want to fire the event, remove the :Fire() from the Connect line and below it do

script.Parent.Intermission:Fire()

@Conorrzz My bad, forgot Event was a Signal, change that line to this

2 Likes

Fire is not a valid member of RBXScriptSignal

You guys…

So, you can only use :Connect with RBXScriptSignal. If you want to fire an event straight after, you can add a function.

But it looks like she edited her post. Use this:

Good luck!

3 Likes

Thank you saved me a lot of time

2 Likes