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
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
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
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
THANKS!
No problem! Happy to help :D