Why is it not letting me GetChildren()?

Hello fellow developers! Today I was making a deploy script and I was getting a weird error.
ServerMain - Roblox Studio 7_11_2021 5_58_29 PM
I the object im getting the children from is a folder.
Here is the function, which is in a script in ServerScriptService.

events:WaitForChild("DeployEvent").OnServerEvent:Connect(function(humanoidrootpart)
	local spawnparts = game:FindFirstChild("SpawnParts"):GetChildren()
	humanoidrootpart.CFrame = spawnparts[math.random(1,8)].CFrame
end)

Thanks for your help!

I think it’s because you used “game” instead of “game.Workspace” ?

O. M. G. I am so stupid. Thank you sir!

2 Likes