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
This better not be impossible...