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

Why is the output saying spawn1 is not a member of Workspace when it is?

  local brick1 = game.Workspace.spawn1
  local brick2 = game.Workspace.spawn2
  local brick3 = game.Workspace.spawn3

spawn1 is not a valid member of Workspace the output says. It clearly is. https://i.postimg.cc/3NTvBZHY/xd23.png

1 answer

✓ Accepted answer

try using

local brick1 = game.Workspace:WaitForChild("spawn1")

The :WaitForChild() waits until it is added into the workspace. The script will run as soon as the game starts and the spawn1 may not have been added into the workspace yet. So it is a good idea to use :WaitForChild()

I'm sorry if this didn't work. Other than this I don't know what you could do to fix it

2 comments

0

THANKS!

0

No problem! Happy to help :D

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