Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does it say teleport restricted?

My script makes it so it tps the player to another place inside of the game but when the player touches the part it says teleport restricted how do i fix it?

I cant make the place public because its a place and because that isnt what i would want if i would work.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local teleportPart = script.Parent
local targetPlaceID = 7284287504 

local TeleportModule = require(ReplicatedStorage:WaitForChild("TeleportModule"))

local function onPartTouch(otherPart)
	local player = Players:GetPlayerFromCharacter(otherPart.Parent)

	if player and not player:GetAttribute("Teleporting") then
		player:SetAttribute("Teleporting", true)

		local teleportResult = TeleportModule.teleportWithRetry(targetPlaceID, {player})

		player:SetAttribute("Teleporting", nil)
	end
end

teleportPart.Touched:Connect(onPartTouch)

1 comment

0

This better not be impossible...

1 answer

Hello there!

If your trying to teleport in studio you cant it doesn't allow it but if this isn't the problem then you probably have third party teleports of in your game settings

to turn this on go to the home tab > game settings > security > Allow third party teleports

Hope this helped.

This discussion is preserved as it was. New answers, comments, and votes are closed.