I keep trying to set the position of a block when it is clones but it keeps giving me this error.
Workspace.PaintBall.Action1:13: invalid argument #2 to 'random' (interval is empty)
script:
local clonesneeded = 50 --how many clones are needed of each type local function ends() game.Workspace.PaintBall.Action1.Disabled = true end while script.Disabled == false do while clonesneeded >= 1 do local v1clones = script.ClonesV1:Clone() v1clones.Parent = game.Workspace.PaintBall v1clones.Name = "clonesV1" v1clones.Transparency = 0 v1clones.Position = Vector3.new(math.random(-70.875, -605.875), 5.473, math.random(-310.375, 260.125)) -- this line has the error local v2clones = script.ClonesV2:Clone() v2clones.Parent = game.Workspace.PaintBall v2clones.Name = "clonesV2" v2clones.Transparency = 0 v2clones.Position = Vector3.new(math.random(-70.875, -605.875), 5.473, math.random(-310.375, 260.125)) clonesneeded = clonesneeded - 1 end end
local clonesneeded = 50 --how many clones are needed of each type local function ends() game.Workspace.PaintBall.Action1.Disabled = true end for i = 1, clonesneeded do if not script.Disabled then local v1clones = script.ClonesV1:Clone() v1clones.Parent = game.Workspace.PaintBall v1clones.Name = "clonesV1" v1clones.Transparency = 0 v1clones.Position = Vector3.new(math.random(-605.875, -70.875), 5.473, math.random(-310.375, 260.125)) local v2clones = script.ClonesV2:Clone() v2clones.Parent = game.Workspace.PaintBall v2clones.Name = "clonesV2" v2clones.Transparency = 0 v2clones.Position = Vector3.new(math.random(-605.875, -70.875), 5.473, math.random(-310.375, 260.125)) else break end end