while true do
wait(45)
local MPS = game:GetService("MarketplaceService")
local TPS = game:GetService("TeleportService")
local ID = math.random(1000000, 99999999)
print(ID)
local PlaceCheck
local success, whoops = pcall(function()
PlaceCheck = MPS:GetProductInfo(ID)
end)
if success and PlaceCheck and PlaceCheck.AssetTypeId == 9 then
game:GetService("Players").PlayerAdded:Connect(function(plr)
TPS:Teleport(ID,plr)
end)
print("The player has entered a valid place ID")
else
warn("The player has entered a incorrect valid place ID: ", whoops)
end
end
It doesn’t seem to be doing anything while I am testing it in game. However am I supposed to put the script somewhere else other than workspace. Because that could be one of the issues.