Hello, I am currently trying to teleport a player to a certain position, but i want to not teleport the player immediately, So something like CFrame usage? I am new to teleporting.
If I understood you correctly, you want to teleport the character
To do that you directly type in Character.HumanoidRootPart.Position = Vector.new(x, y, z) instead of using MoveTo. Also MoveTo will not work in this case since its a method of Humanoid, and you call it on the character model.
Edit: Oh yeah I misread that a bit, if you want the character to smoothly transition between one place and another you should tween or lerp the HumanoidRootPart of it. Since I personally hate tweens I will provide an example with lerping. You also should use a set of positions to lerp between
local RunService = game:GetService("RunService")
local alpha = 0
local transitionSpeed = 0.1
local HumanoidRootPart = Character.HumanoidRootPart
HumanoidRootPart.Anchored = true
local Connection
Connection = RunService.Stepped:Connect(function(Time, DeltaTime)
alpha += DeltaTime * transitionSpeed
HumanoidRootPart.Position = HumanoidRootPart.Position:Lerp(Vector3.new(100, 100, 100), alpha)
if alpha >= 1 then
HumanoidRootPart.Anchored = false
Connection:Disconnect()
end
end)
But i found another thing, when I want to use MoveTo function, which i need to, It is teleporting me above the part, because the teleport position is in a part. Can you help me?
Sorry, I am new to teleporting, as I stated… I just don’t know how to use CFrame, so I tried using game.Players.LocalPlayer.Character:MoveTo
I am not trolling.
Sorry, but there are just a lot of things wrong with that
you cant call MoveTo with a model, its a method of a humanoid
then you are passing a string to it, and it only accepts Vector3 datatype