Invalid argument #2 to 'random' (interval is empty) line 25

local Model = script.Parent

local SelectedPos1

local SelectedPos2

repeat wait() until #Model:GetChildren() == 3

while wait() do
	
	for _, PlatForm in pairs(Model:GetChildren()) do

		if PlatForm:IsA("BasePart") then

			if PlatForm.Name == "PlatForm1" then

				SelectedPos1 = Vector3.new(math.random(-7,7), PlatForm.Position.Y, math.random(-595,-634))
				
				wait(10)

				PlatForm.BodyPosition.Position = SelectedPos1
				
			else
				
				SelectedPos2 = Vector3.new(math.random(-7,7), PlatForm.Position.Y, math.random(-660,-699))

				PlatForm.BodyPosition.Position = SelectedPos2

			end

		end

	end
	
	repeat
		
		wait(1)
		
	until Model.PlatForm1.Position == SelectedPos1
	
	repeat

		wait(1)

	until Model.PlatForm2.Position == SelectedPos2
	
end

The reason it’s doing that is because your maximum is lower than your minimum. And it’s because of your negative math.randoms, aka

math.random(-595,-634)

And

math.random(-660,-699)

Negatives further away from 0 are less than negatives closer to 0, flip them around and you should be good

Ok that works but the platform falls

Think it may be something wrong with the configuration you have with the BodyPosition, I would recommend doing some research on it as I’m not experienced with them yet

Ok and last question, how to make player not fall from it