I Wanted To Make A Part Spawner That Can Spawn More Than 2 Things With A Chance Rate I Tried To Make One But, It won't work any answers?
function kok() local p = Instance.new("Part") p.Position = script.Parent.Position p.Name = "Rock" p.Parent = script.Parent function lol() local s = Instance.new("Part") s.Position = script.Parent.Position s.Name = "Stuff" s.Parent = script.Parent end end while true do f = math.random(1,2) if f == 1 then kok() elseif f == 2 then lol() wait(1.5) end end
function kok() local p = Instance.new("Part") p.CFrame = CFrame.new(0,0,0) -- Add Position p.Name = "Rock" p.Parent = script.Parent print("1") end function lol() local s = Instance.new("Part") s.CFrame = CFrame.new(0,0,0) -- Add Position s.Name = "Stuff" s.Parent = script.Parent print("2") end while true do f = math.random(1,2) if f == 1 then kok() elseif f == 2 then lol() end wait(1.5) end