Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

lua teleport

local debounce = false

script.Parent.Touched:Connect(function (hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)

    if player and not debounce then
        debounce = true

        local char = player.Character
        local rootPart = char:WaitForChild("HumanoidRootPart")

        char:MoveTo(rootPart.Position + Vector3.new(0, 10, 0))

        wait(.5)
        debounce = false
    end
end)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #lua #teleport
ADD COMMENT
Topic
Name
7+7 =