#i don't understand what im doing wrong

6 messages · Page 1 of 1 (latest)

plush prism
#

local forpart = game.Workspace.LoopsModel.ForPart

for counter = 1, 10, 1 do
task.wait(3)
forpart.Position = Vector3.new(math.random(-26, -20), math.random(5, 1), -30)
forpart.Color = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
end

Workspace.Loops:6: invalid argument #2 to 'random' (interval is empty) - Server - Loops:6
Stack Begin - Studio
Script 'Workspace.Loops', Line 6 - Studio - Loops:6
Stack End - Studio

steady void
#

The error is due to math.random(5, 1), which is an invalid range. Since 5 is greater than your max (1)

plush prism
#

alr let me try

#

alr im pretty dumb, it's obviusly i need to put the 1 before 5

#

thank you for the help!

steady void
#

yep