Categories > Coding > Lua >

Why is my Lua script not working, Making a tween service for roblox to bypass teleport

New Reply

Posts: 1

Threads: 1

Joined: Jul, 2025

Reputation: 0

Posted

local ts = game:GetService("TweenService")

local teleport = ts:Create(game.Players.LocalPlayer.Character.HumanoidRootPart, TweenInfo.new(3000), {CFrame = CFrame.new(-291.390808, 18.2636929, 1597.67761, 0.467862487, -8.63611689e-08, 0.883801281, 7.26185547e-08, 1, 5.9273134e-08, -0.883801281, 3.64486965e-08, 0.467862487)})
teleport:Play()
  • 0

  • Comment

Posts: 2

Threads: 0

Joined: Jun, 2023

Reputation: 0

Replied

local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")

local player = Players.LocalPlayer

 

player.CharacterAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:WaitForChild("HumanoidRootPart")


local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Linear)


local goal = {
    CFrame = CFrame.new(
        -291.390808, 18.2636929, 1597.67761,
         0.467862487, -8.63611689e-08, 0.883801281,
         7.26185547e-08, 1, 5.9273134e-08,
        -0.883801281, 3.64486965e-08, 0.467862487
    )
}

local teleportTween = TweenService:Create(hrp, tweenInfo, goal)
teleportTween:Play()

  • 0

  • Comment

Login to unlock the reply editor

Add your reply

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )