
Key Required

local speed = 200
local part = workspace.Map:WaitForChild("ExitPart")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:WaitForChild("HumanoidRootPart")
local destination = part.CFrame
local distance = (destination.Position - hrp.Position).Magnitude
local duration = distance / speed
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local tween = TweenService:Create(hrp, tweenInfo, {CFrame = destination})
tween:Play()No comments yet for this script.



