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

Spawns is not a valid member of Model uh?

local Spawn = Clone.Spawns:GetChildren()[math.random(1, #Clone.Spawn:GetChildren())]
        v.Character:SetPrimaryPartCFrame(Spawn.CFrame * CFrame.new(0, 5,0))
        Spawn:Destroy()

Whats Wrong This is Error 1:31:38.189 - Spawns is not a valid member of Model

1 comment

0

Try reading the error maybe?

1 answer

✓ Accepted answer

The first time you reference the Spawn it is plural and the second time is singular. This is probably just a typo, and you have to remove the 's' from the end of Spawns.

local SpawnChildren = Clone.Spawn:GetChildren()
local Spawn = SpawnChildren[math.random(#SpawnChildren)]

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