 1  # Invalid argument #2 to random, interval is empty, but it's not? deeskaalstickman649 388 9 months ago

I understand the error, it's saying the 2nd argument is smaller than the 1st. However, the first argument has 8 digits whilst the 2nd argument has 11 digits. Here is the math.random()

local torque = Vector3.new(math.random(30000000, 12500000000), math.random(30000000, 12500000000), math.random(30000000, 12500000000))


, and here is the whole if statement including the FindPlayers().

local allPlayers = {}
local function FindPlayers()
for i, playerSelected in pairs(game.Players:GetPlayers()) do
table.insert(allPlayers, playerSelected.Character)
end
end

if split == 'greateryaYEET' then
local torque = Vector3.new(math.random(30000000, 12500000000), math.random(30000000, 12500000000), math.random(30000000, 12500000000))
local AV = Vector3.new(math.random(0, 720), math.random(0, 720), math.random(0, 720))
local BAV

if split == 'me' then
allPlayers = {player.Character}
elseif split == 'all' then
FindPlayers()
else
allPlayers = {workspace:FindFirstChild(split)}
end

local success, eMes = pcall(function()
for i, char in pairs(allPlayers) do
char.Humanoid.Sit = true

BAV = Instance.new('BodyAngularVelocity', char.HumanoidRootPart)

BAV.MaxTorque = torque
BAV.P = 2500
BAV.AngularVelocity = AV
end
end)
if success then
wait(.5)
BAV:Destroy()
torque = Vector3.new(math.random(30000000, 12500000000), math.random(30000000, 12500000000), math.random(30000000, 12500000000))
AV = Vector3.new(math.random(0, 720), math.random(0, 720), math.random(0, 720))
else
return eMes
end
end


This could be an integer overflow? Note: The whole script is quite long, so i decided not to include it.

1   moo1210 587 9 months ago

Yep, are you are getting an integer overflow. There is not much you can do about this other than to remove an 0. 0
Alright, I'll give that a try. deeskaalstickman649 388 — 9mo 0
A little dissapointing how i can't have the number as high as i wanted, but its fine. deeskaalstickman649 388 — 9mo 1   zadobyte 692 9 months ago
Edited 9 months ago

If the max of math.random is lower than the min (e.g. math.random(10,1)) it'll give that error. 2 1