Whenever I join my game, an error code pops up on the screen saying "Error 733, Attempting to teleport to a place that is restricted". It doesn't spawn me at the games lobby and keeps spawning me over the void. I have tried making the game public (It was private) and even using my alt. Nothing has worked.
Does anyone know what could be causing this? And if so how would I fix it?
Thank you.
Here are all the scripts in my game. The Mainscript:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local MapsFolder = ServerStorage:WaitForChild("Maps")
local Status = ReplicatedStorage:WaitForChild("Status")
local GameLength = 600
local reward = 1
while true do
Status.Value = ("Waiting for enough players")
repeat wait(1) until game.Players.NumPlayers >= 2
Status.Value = ("Intermission")
wait(38)
local plrs = {}
for i, player in pairs (game.Players:GetPlayers()) do
if player then
table.insert(plrs,player)
end
end
wait(2)
local AvailableMaps = MapsFolder:GetChildren()
local ChosenMap = AvailableMaps[math.random(1,#AvailableMaps)]
Status.Value = ChosenMap.Name.." Chosen"
local ClonedMap = ChosenMap:Clone()
ClonedMap.Parent = workspace
local SpawnPoints = ClonedMap:FindFirstChild("SpawnPoints")
if not SpawnPoints then
print ("SpawnPoints not found!!! You big dummy!!!")
end
local AvailableSpawnPoints = SpawnPoints:GetChildren()
for i, player in pairs(plrs) do
if player then
character = player.Character
if character then
character:FindFirstChild("HumainoidRootPart").CFrame =
AvailableSpawnPoints[1].CFrame
table.remove(AvailableSpawnPoints,1)
local GameTag = Instance.new("BoolValue")
GameTag.Name = "GameTag"
GameTag.Parent = player.Character
else
if not player then
table.remove(plrs,i)
end
end
end
end
Status.Value = "Teleporting"
wait(5.5)
for i = GameLength,0,-1 do
for x, player in pairs(plrs)do
if player then
character = player.Character
if not character then
else
if character:FindFirstChild("GameTag") then
print(player.Name.." is still alive")
else
table.remove(plrs,x)
print(player.Name.." has been killed")
end
end
else
table.remove(plrs,x)
print(player.Name.." has been killed")
end
end
Status.Value = "Time till Deathmatch "..i.." Players remaining "..#plrs
if #plrs == 1 then
Status.Value = plrs[1].Name.." wins!!!"
plrs[1].leaderstats.Wins.Value = plrs[1].leaderstats.Wins + reward
break
elseif #plrs == 0 then
Status.Value = "All players have perished "
break
elseif i == 0 then
Status.Value = "Teleporting to Deathmatch "
end
wait(1)
end
end
The stats script:
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local kills = Instance.new("IntValue")
kills.Name = ("Kills")
kills.Value = 0
kills.Parent = leaderstats
local wins = Instance.new("IntValue")
wins.Name = ("Wins")
wins.Value = 0
wins.Parent = leaderstats
end)
And a local script I have in a text button:
local Status = game:GetService("ReplicatedStorage"):WaitForChild("Status")
script.Parent.Text = Status.Value
Status:GetPropertyChangedSignal("Value"):Connect(function()
script.Parent.Text = Status.Value
end)
And a kill script:
local trapPart = script.Parent
local function onPartTouch(otherPart)
local partParent = otherPart.Parent
local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
if humanoid then
humanoid.Health = 0
end
end
trapPart.Touched:Connect(onPartTouch)

4 comments
did you use free models? it could be a virus that tried to send you to another game
I have used two but I scanned them with SteadyOn's scanner plugin before hand to check for viruses, I'll delete them quick and see if it helps.
I deleted all my free models and the error is still there.
Hey, I think you should provide any scripts you believe are causing this.