Nex Rooms Kit Randomizer Bugging In Non-Solo Servers

My Nex Rooms Kit entity randomizer works in PlayTest mode-but not in Team Test or Roblox itself.
Code:

 local function GenerateEntity(EntityName, C1,C2,C3, EntitySpeed, EntityAudio, EntityImage, EntityMech, EntityAudioSpeed)
	local EntityMain = game.ServerStorage["entity templates"]:WaitForChild(EntityMech):Clone()
	EntityMain.Name = "A-" .. EntityName
	EntityMain.Speed.Value = EntitySpeed
	EntityMain.RushNew.PointLight.Color = Color3.new(C1 / 255, C2 / 255, C3 /255)
	EntityMain.RushNew.Entity.Image1.ImageColor3 = Color3.new(C1 / 255, C2 / 255, C3 /255)
	EntityMain.RushNew.Entity.Image1.Image = "rbxassetid://" .. EntityImage
	EntityMain.RushNew.PlaySound.SoundId = "rbxassetid://" .. EntityAudio
	EntityMain.RushNew.PlaySound.PlaybackSpeed = math.random(9, 11) / 10
	EntityMain.Parent = game.ServerStorage.Monsters.ASection.OnDoorOpened
	print(EntityName)
 end
--GenerateEntity(0, 173, 0, 0, 10, 9044482768, 1972219024, 5)
local Sounds = {9119581034,9119656225,7220020324,1838765692,8447805453,9117118928,1177475221,4671540245,5500190500,251407575,749517627,2101658119,6567183465,6942248867}
local Images = {18586302715,15971686317,14532959400,14571709626,16804066476,16046004620,16692721838,16012059352,16690784228,14691458964,15992868154,16115280648,15473403004,17401453373,15812870262,16073671181,13592371404}
local Numeral = 0

repeat
		Numeral += 1
	GenerateEntity(Numeral, math.random(50, 255), math.random(50, 255), math.random(50, 255), math.random(50, 50 + (Numeral * 2)), Sounds[math.random(1, #Sounds)], Images[math.random(1, #Images)], game.ServerStorage["entity templates"]:GetChildren()[math.random(1, #game.ServerStorage["entity templates"]:GetChildren())].Name, math.random(9, 25) / 10)
	if Numeral >= 60 then
		if game.ServerStorage["Entity Additions"]:FindFirstChild("(No Aim) spawn infront entity") then
			game.ServerStorage["Entity Additions"]["(No Aim) spawn infront entity"].Parent = game.ServerStorage["entity templates"]
			print("60")
		end
	end
	if Numeral >= 90 then
		if game.ServerStorage["Entity Additions"]:FindFirstChild("locker checker") then
			game.ServerStorage["Entity Additions"]["locker checker"].Parent = game.ServerStorage["entity templates"]
			print("90")
		end
		if game.ServerStorage["Entity Additions"]:FindFirstChild("bluelocker checker checker") then
			game.ServerStorage["Entity Additions"]["bluelocker checker checker"].Parent = game.ServerStorage["entity templates"]
		end
	end
	if Numeral >= 150 then
		if game.ServerStorage["Entity Additions"]:FindFirstChild("locker breaker entity") then
			game.ServerStorage["Entity Additions"]["locker breaker entity"].Parent = game.ServerStorage["entity templates"]
			print("150")
		end
	end
	if Numeral >= 200 then
		if game.ServerStorage["Entity Additions"]:FindFirstChild("(Aim) spawn infront entity") then
			game.ServerStorage["Entity Additions"]["(Aim) spawn infront entity"].Parent = game.ServerStorage["entity templates"]
			print("200")
		end
		if game.ServerStorage["Entity Additions"]:FindFirstChild("infront locker checker (no aim)") then
			game.ServerStorage["Entity Additions"]["infront locker checker (no aim)"].Parent = game.ServerStorage["entity templates"]
		end
	end
		wait()
until Numeral >= 360
--17401453373--EntityMech1607367118116073671181
for i, obj in pairs(game.ServerStorage:GetDescendants()) do
	print(obj.Name)
end

Examples:
Solo:
robloxapp-20240816-1832470.wmv (137.8 KB)
Multiplayer:
robloxapp-20240816-1833521.wmv (1.4 MB)

1 Like