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

Why does position not go to the position i set it to?

heres my script

M16 = game.Lighting.Items.MillitaryWeapons.M16
spawn = {M16}
while wait() do
Spawns = spawn[math.random(1, #spawn)]
Spawns:Clone().Parent = game.Workspace
Spawns.Position = Vector3.new(script.Parent.Position)
wait(300)
end

why does the position go to the exact location?

1 answer

Spawns:Clone().Parent parents a clone of Spawns. Then, when you set Spawns.Position you are not referring to that clone.

M16 = game.Lighting.Items.MillitaryWeapons.M16
spawn = {M16}
while wait() do
	Spawns = spawn[math.random(1, #spawn)]
	Spawns = Spawns:Clone();
	Spawns.Parent = game.Workspace
	Spawns.Position = script.Parent.Position
	wait(300)
end

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