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[2] == '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[3] == 'me' then allPlayers = {player.Character} elseif split[3] == 'all' then FindPlayers() else allPlayers = {workspace:FindFirstChild(split[3])} 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 print('Admin command successfully initiated!') 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.
Yep, are you are getting an integer overflow. There is not much you can do about this other than to remove an 0.
If the max of math.random
is lower than the min (e.g. math.random(10,1)
) it'll give that error.
Edit: My bad, didn't read the beginning of the post.
Edit 2: For some reason, it works when you remove one zero off the second number. As to why, I have no clue