So, I know that this type of question has been answered but none of that helped me!! :(
Here is the error: bad argument #2 to 'random' (interval is empty)
The reason is that I am making an SCP game with my friend, and for SCP-173, I need a random tp script. What I have so far is a specified grid on where it can move.
Here is the script:
-- // Developed By BabyDevil285 \\ --
-- // Variables
local scp = script.Parent
local torso = scp.Torso
local hum = scp.Humanoid
local movementgrid = workspace.SCP_173_MovementGrid
local scpXmovement = math.random(-565, -595)
local scpZmovement = math.random(148, 188)
-- // Functions
local function Slide()
torso.Position = Vector3.new(scpXmovement, 0, scpZmovement)
end
-- // Slide Event
while true do
wait(math.random(4, 17))
Slide()
end
-- // Kill Event
-- Soon.
The line of error: 9
Please help!!

3 comments
Can you try to switch the numbers? math.random( -595, -565)
Just saying, I believe the error appears because I'm using negative numbers! However I need those negative numbers so that the SCP stays inside the specified grid! :(
Not sure, let me try