Basically, once the players touch thhis part, it will teleport them to a random place. Problem is, that most of the time the places are invalid or closed. So, how can I make it so that if the math.random place is considered a valid place?
Script:
local telePart = script.Parent local TeleportService = game:GetService('TeleportService') while wait(5) do local function otherGame(otherPart) local placeID = game.Workspace.PlaceValue.Value local player = game.Players:FindFirstChild(otherPart.Parent.Name) if player then local placetp = TeleportService:Teleport(placeID, player) end end telePart.Touched:Connect(otherGame) end