Hi I have a problem When I try to teleport a character to a position to she jaggedly jumps or comes out from under the ground and I would like to fix it but I don’t know how and that’s why here I ask how to make a smooth transition to a new position
I can not see your code, but, when teleporting add either a CFrame or Vector depending how you are teleporting.
Example:
Player.Character.CFrame = CFrame.new(CFrame here) + CFrame.new(0,3,0)
ok, I’ll try later and let you know
Player.Character
(a Model
) does not have a CFrame
property. Model | Documentation - Roblox Creator Hub
Either use Player.Character:PivotTo()
, or set the CFrame
of its PrimaryPart
.
This is invalid code. To add a CFrame
to another CFrame
, you need to use the *
(multiply) operator. https://create.roblox.com/docs/reference/engine/datatypes/CFrame#math-operations
unfortunately it didn’t work now the character teleports from the top, so here is my script to make it easier
> local lina = game.Workspace:WaitForChild("Lina")
>
> local pos1 = lina.Pos1
> local power = lina.Power
>
> local rig = workspace:WaitForChild("Rig")
>
> power.Changed:Connect(function(value)
> lina.Position = Vector3.new(power.Value,lina.Position.Y,lina.Position.Z)
> rig.HumanoidRootPart.CFrame = pos1.WorldCFrame * CFrame.new(0,3,0)
> end)
local lina = workspace:WaitForChild("Lina")
local pos1 = lina.Pos1
local power = lina.Power
local rig = workspace:WaitForChild("Rig")
power.Changed:Connect(function(value)
lina.Position = Vector3.new(power.Value,lina.Position.Y, lina.Position.Z)
rig.HumanoidRootPart.CFrame = pos1.WorldCFrame + Vector3.new(0,5,0)
end)
Go ahead and try this, if this doesn’t work would you mind giving me a copy of the file? I feel as if I am missing some stuff going on. Pretty much when you teleport the play, you want to add 5(ish) to their Y axis as their HumanoidRootPart while standing on a platform is 3 studs higher. This makes it so when you teleport them there they will be teleported slightly above the point and fall naturally down to the ground. Hopefully this helps, let me know how it goes. Thanks!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.