Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

So how would i mention wait for child Minigame.Minigame 1?

so im tryna do a wait for child thing would i type the whole "MiniGame.Minigame1" or just Minigame 1

heres an attempt i guess

local ServerScriptService = game:GetService("ReplicatedStorage")

local remoteEvent = ServerScriptService:WaitForChild("Minigame Script.Minigame 1")
local map = math.random(1, 3)

--Checking if there are atleast 2 players in the game

players = game.Players:GetChildren()
if #players >= 2 then
	
	--Choosing MiniGame

	if map == 1 then
		print("Minigame 1 has been chosen")
		
	else
		if map == 2 then
			print("Minigame 2 has been chosen")
		else
			if map == 3 then
				print("Mini game 3 has been chosen")
			end
		end
	end
end

1 answer

✓ Accepted answer
ServerScriptService.MinigameScript:WaitForChild("Minigame1")

or

ServerScriptService:WaitForChild("MinigameScript"):WaitForChild("Minigame1")

This discussion is preserved as it was. New answers, comments, and votes are closed.