An Error is Preventing Me From Testing My Game. How Would I Fix It?
Asked by
4 years ago Edited 4 years ago
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:
001 | local ReplicatedStorage = game:GetService( "ReplicatedStorage" ) |
003 | local ServerStorage = game:GetService( "ServerStorage" ) |
005 | local MapsFolder = ServerStorage:WaitForChild( "Maps" ) |
007 | local Status = ReplicatedStorage:WaitForChild( "Status" ) |
009 | local GameLength = 600 |
016 | Status.Value = ( "Waiting for enough players" ) |
018 | repeat wait( 1 ) until game.Players.NumPlayers > = 2 |
020 | Status.Value = ( "Intermission" ) |
026 | for i, player in pairs (game.Players:GetPlayers()) do |
028 | table.insert(plrs,player) |
034 | local AvailableMaps = MapsFolder:GetChildren() |
036 | local ChosenMap = AvailableMaps [ math.random( 1 ,#AvailableMaps) ] |
038 | Status.Value = ChosenMap.Name.. " Chosen" |
040 | local ClonedMap = ChosenMap:Clone() |
041 | ClonedMap.Parent = workspace |
043 | local SpawnPoints = ClonedMap:FindFirstChild( "SpawnPoints" ) |
045 | if not SpawnPoints then |
046 | print ( "SpawnPoints not found!!! You big dummy!!!" ) |
049 | local AvailableSpawnPoints = SpawnPoints:GetChildren() |
051 | for i, player in pairs (plrs) do |
053 | character = player.Character |
057 | character:FindFirstChild( "HumainoidRootPart" ).CFrame = |
058 | AvailableSpawnPoints [ 1 ] .CFrame |
059 | table.remove(AvailableSpawnPoints, 1 ) |
061 | local GameTag = Instance.new( "BoolValue" ) |
062 | GameTag.Name = "GameTag" |
063 | GameTag.Parent = player.Character |
074 | Status.Value = "Teleporting" |
078 | for i = GameLength, 0 ,- 1 do |
080 | for x, player in pairs (plrs) do |
083 | character = player.Character |
085 | if not character then |
088 | if character:FindFirstChild( "GameTag" ) then |
090 | print (player.Name.. " is still alive" ) |
094 | print (player.Name.. " has been killed" ) |
100 | print (player.Name.. " has been killed" ) |
104 | Status.Value = "Time till Deathmatch " ..i.. " Players remaining " ..#plrs |
107 | Status.Value = plrs [ 1 ] .Name.. " wins!!!" |
108 | plrs [ 1 ] .leaderstats.Wins.Value = plrs [ 1 ] .leaderstats.Wins + reward |
110 | elseif #plrs = = 0 then |
111 | Status.Value = "All players have perished " |
114 | Status.Value = "Teleporting to Deathmatch " |
The stats script:
01 | game.Players.PlayerAdded:Connect( function (player) |
03 | local leaderstats = Instance.new( "Folder" ) |
04 | leaderstats.Name = "leaderstats" |
05 | leaderstats.Parent = player |
07 | local kills = Instance.new( "IntValue" ) |
10 | kills.Parent = leaderstats |
12 | local wins = Instance.new( "IntValue" ) |
15 | wins.Parent = leaderstats |
And a local script I have in a text button:
1 | local Status = game:GetService( "ReplicatedStorage" ):WaitForChild( "Status" ) |
3 | script.Parent.Text = Status.Value |
5 | Status:GetPropertyChangedSignal( "Value" ):Connect( function () |
7 | script.Parent.Text = Status.Value |
And a kill script:
01 | local trapPart = script.Parent |
03 | local function onPartTouch(otherPart) |
04 | local partParent = otherPart.Parent |
05 | local humanoid = partParent:FindFirstChildWhichIsA( "Humanoid" ) |
11 | trapPart.Touched:Connect(onPartTouch) |