📜  如何使接近提示传送您 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:33.199000             🧑  作者: Mango

代码示例1
function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
        TeleportService:Teleport(Place, player)
    end
end

script.Parent.Touched:Connect(onTouched)