-- Script_TelePort_2: Скрипт телепорта-передатчика N 2.
-- (см., также, roamer55.ru)

-- ---------------------------------
-- телепорт-приемник N 1
local tpr = game.Workspace.Room_TP.TP_1.TP_Receiver_1
-- ---------------------------------

local YesPress = false
function Touch(hit)
    if YesPress == false then -- защита от "дребезга контактов"
        if hit then
            if hit.Parent:FindFirstChild("Humanoid") then -- Humanoid
                local player = game.Players:GetPlayerFromCharacter(hit.Parent)
                if player then -- player
                    YesPress = true
                    hit.Parent:moveTo(tpr.Position) -- перемещение в телепорт
                    wait(1)
                    YesPress = false
                end
            end
        end
    end
end

script.Parent.Touched:Connect(Touch)