Position Lock Loop Teleport
Key RequiredUniversal

Position Lock Loop Teleport

Universal Scriptvenoxvenox 11.2K views 207 executesUpdated May 31, 2024
5.0/ 5(1 votes)
10100% Positive
Lua Script•25 lines (871 chars)
getgenv().teleport = true

local player = game.Players.LocalPlayer
local character = player.Character
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")

local currentPosition = humanoidRootPart.CFrame
local targetPosition = Vector3.new(currentPosition.X, humanoidRootPart.Position.Y, currentPosition.Z) 

while getgenv().teleport do
    wait(2) -- Teleport Delay (freeze char. under 1 second)
    local TweenService = game:GetService('TweenService')
    local currentCFrame = humanoidRootPart.CFrame
    local rotation = currentCFrame - currentCFrame.p

    local targetCFrame = CFrame.new(targetPosition) * rotation

    local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear)
    local tweenProperties = {
        CFrame = targetCFrame
    }

    local tween = TweenService:Create(humanoidRootPart, tweenInfo, tweenProperties)
    tween:Play()
end

Features & Information

Features: -Teleports player to a designated position. (position of char when executing) -Executes every 2 seconds. (can be changed)

Community Comments (2)

StarProjectzStarProjectzAug 5, 2024(edited)

thanks alot!

StarProjectzStarProjectzAug 5, 2024(edited)

im using this for a stand script!

More Scripts for Universal Scripts