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

Why does my NPC spawn block spawn it's NPCs at another spawn block?

Hello! I've been working on a npc spawn block, and it's been working, but periodically, it spawns NPCs at the opposing team's spawn! Why does it do this? Here's the code:

local spawnPos = script.Parent

while wait(45) do 
local noob1 = game.ServerStorage.Noobs["Bomber"]:clone() 
noob1.Parent = game.Workspace 
noob1:MoveTo(pos.Position + Vector3.new(0,1,0)) 
noob1:MakeJoints()

end

What's wrong with it?

2 comments

0

is there more code to this?

0

No.

1 answer

Line 6: noob1:MoveTo(pos.Position + Vector3.new(0,1,0)) You haven't defined what pos is in pos.Position, try fixing that. I think you mean to replace it with spawnPos.

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