I made a part with a script that chooses a random setup per 3 seconds (In roblox time) but the problem Is that the spawner doesn't spawn the setups

local part = script.Parent
local replicatedstorage = game.ReplicatedStorage

while true do
	wait(3)
	local SetUpType = math.random(1,2)
	
	if SetUpType == 1 then
		local SetUp1 replicatedstorage.SetUp1:Clone()
		SetUp1.Parent = game.Workspace
		SetUp1.Position = script.Parent.Position
	end
	if SetUpType == 2 then
		local SetUp2 replicatedstorage.SetUp2:Clone()
		SetUp2.Parent = game.Workspace
		SetUp2.Position = script.Parent.Position
	end
end

1 comment

0

That's because nor SetUp1 nor SetUp2 are set to anything, something correct would look like local SetUp2 = replicatedstorage.SetUp2:Clone()