Why does the player character bug?

I have been doing an animation which is to move (it is activated when the player presses the e key) it is supposed that when the player presses the e key an animation is activated and the position of the root part of the humanoid of the character of the character is changed. player, the position is changed, but the problem is that it moves to a specific place. Knowing that I programmed it to move a few more coordinates to the front. and i know it should work fine because i tried it with one part and it worked fine but i don’t really know what the problem is
here is the script:

local player = game.Players.LocalPlayer
local uis = game:GetService("UserInputService")
local char = player.Character
local animacion = script:WaitForChild("Animation")
local humanoid = char:WaitForChild("Humanoid")
local parteprincipal = char:FindFirstChild("HumanoidRootPart")
local tween = game:GetService("TweenService")
local info = TweenInfo.new(
	0.29,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.InOut,
	0,
	false,
	0)
local cambios = {Position = parteprincipal.CFrame * Vector3.new(0,0,-017.123)}
local value = true
local activar = humanoid:LoadAnimation(animacion)
uis.InputBegan:Connect(function(key)
	if key.KeyCode == Enum.KeyCode.E then
	if value then
			value = false
			local ejecutarTween = tween:Create(parteprincipal,info,cambios)
			activar:Play()
			
			ejecutarTween:Play()
			wait(7)
			value = true
							
		end
	end
end)
2 Likes

Sorry, what is the problem, I dont understand your explanation sorry

2 Likes

Can you please elaborate more on the issue so I can help you I don’t understand.

2 Likes

What I mean is that when it is executed, the root part of the Humanoid and the rest of the body are separated and it also goes to a specific position

1 Like

Also could you provide a video of the problem?

2 Likes

no sorry i need people who know scripting sorry

1 Like

Can you send a video so I can see what is going wrong?

2 Likes

let me see if i can wait please

1 Like

If I’m not wrong Vector3 is used for Models, not for parts, as you are using it for the HumanoidRootPart, not sure if it’s gonna work but try changing the Vector3 to CFrame

1 Like

in the category it says COMMAND SEQUENCES. something you don’t understand…
Vector3 is for parts, PIVOT TO is for models. Also in the subject it says that I tried it with a part and it worked. but nice try @Dede_4242

1 Like

Comments? There’s no comments in the scrip, also I forgot about the part we’re you said you tried with a part, but was taht part into a module or not, that could be the cause of the problem maybe…

1 Like

robloxapp-20230212-1451020.wmv (6.2 MB)

1 Like

no brother no sorry I don’t know where I’m standing or what the problem is and I don’t know what you mean by module part?

1 Like

I’m on mobile and can’t download that. Can you convert it to a mp4?

2 Likes

a ok sorry lol sorry excuse me

1 Like

Sorry, I meant model, I’m em writing on phone so there’s the auto corrector and that’s what comes out of it, also what do you mean with

?

1 Like

To make easy for all, when you need to show a video, upload it to streamable.com and then send the link.

2 Likes

Or also YouTube, but not everyone has a YouTube account and channel

2 Likes

robloxapp-20230212-1451020 thanks

1 Like

robloxapp-20230212-1451020 it is

1 Like