I got the error at line 15 I think and I spent a while trying different things to fix it but just can’t figure it out, how do I fix it?
local m = game.ServerStorage.Clones.Noob:Clone()
local s1 = game.Workspace.EnemySpawns.s1
local s2 = game.Workspace.EnemySpawns.s2
local s3 = game.Workspace.EnemySpawns.s3
local s4 = game.Workspace.EnemySpawns.s4
local s5 = game.Workspace.EnemySpawns.s5
local spawns = {s1, s2, s3 ,s4, s5}
while true do
local pos = math.random(1, #spawns)
wait(2)
local cloned = m:clone()
cloned.Parent = script.Parent
cloned.HumanoidRootPart.CFrame = CFrame.new(pos.Position)
cloned:makeJoints()
end
I was originally using another method where it just used one spawn and the spawn’s position but I wanted to add random enemy spawns, and then it broke, how do I fix it?