Line 12 and 13 won't clone?
local levels = game.ServerStorage.Levels:GetChildren()
local selectedlevel = math.random(1,#levels)
local debounce = true
print(selectedlevel)
script.Parent.Touched:Connect(function()
if debounce == true then
for i, v in pairs(levels) do
if v.Name == tostring(selectedlevel) then
local cloned = v:Clone()
cloned.Parent = game.Workspace
v:SetPrimaryPartCFrame(CFrame.new(script.Parent.Position) + CFrame.new(15,0,0))
end
end
end
end)
Thanks!
