For some reason it fires all 3 events at once, any fix? Heres the mini game script the fires the remote event :
wait(5)
local ServerScriptService = game:GetService("ServerScriptService")
local Minigame1 = ServerScriptService.MinigameScript:WaitForChild("Minigame1")
local Minigame2 = ServerScriptService.MinigameScript:WaitForChild("Minigame2")
local Minigame3 = ServerScriptService.MinigameScript:WaitForChild("Minigame3")
local map = math.random(1, 3)
--Checking if there are atleast 2 players in the game
wait(0.1)
--Choosing MiniGame
if map == 1 then
print("Minigame 1 has been chosen")
Minigame1:FireServer()
else
if map == 2 then
print("Minigame 2 has been chosen")
Minigame2:FireServer()
else
if map == 3 then
print("Mini game 3 has been chosen")
Minigame3:FireServer()
end
end
end
There are scripts inside the event, which just print "Minigame 1 fired", ect
Video of studio, scripts and output:

16 comments
If it didn't work send a comment
all of them still
fire at once and print
minigame "" was fired
i'll edit it later
kk
Why do you have scripts for different Minigames? That's why it is printing for each minigame
I think you can make this shorter by doing: if map == tabs[map] then print("Minigame " .. map " has been chosen") tabs[map]:FireServer end
mhm i was trying to print a minigame then teleport the players the the playing section kinda like super bomb survival then inside the remote event script it would be the script for the minigame
instead of making them in seprate scripts should i make evrything controlled by that one script?
yes, only if you want to get something from the local player
thanks
you can teleport player's character with changing the CFrame of the HumanoidRootPart
@MarkedTomato where you said: "I think you can make this shorter by doing: if map == tabs[map] then print("Minigame " .. map " has been chosen") tabs[map]:FireServer end"
that wouldn't work, because its getting the table of all the descendants. You also, forgot to include the parenthensis in :FireServer()
and also, even if it works it won't be what he's looking for.