"Invalid argument #2 to 'random' (interval is empty)"?

I’m not sure why this is happening, but this error happens when using math.random(). The error happens on the local randomX line. Help

local money = game.ReplicatedStorage.Money

while wait() do
	local droptime = math.random(30,60)
	task.wait(droptime)
	local drop = money:Clone()
	local randomX = math.random(236,24)
	local randomY = math.random(-35,-248)
	
	drop.Parent = workspace
	drop.Position = Vector3.new(randomX, 2.5, randomY)
end

Sorry if this is a topic already.

The second number is the maximum, so switch the two number (same is for randomY -248 is smaller than -35)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.