Player is movement is messed up after :PivotTo

after the teleportation is done and the script is finished and player can now move again, whenever i move it moves either in the opposite direction or sideways. What may be the issue?

Here is the code -

wakeupanim:GetMarkerReachedSignal('wood'):Connect(function()
			--woodsoundplay
			dummy.Parent = game.ReplicatedStorage
			plr.Character:PivotTo(workspace.wakeupbedplrtp.CFrame)
			hideblackbarup:Play()
			hideblackbardown:Play()
			plr.PlayerGui.cam.Enabled = true
			wait(1)
			plr.Character.Humanoid.WalkSpeed = 12
			plr.Character.crouch.Enabled = true
			plr.Character.sprint.Enabled = true
		end)

thanks for your time

This has happened to me before! If you’re using a server-sided script then you can just use:

player.Character.PrimaryPart.Cframe = --Anything you want. (i.e part.Cframe)

I don’t know if it’s a bug, all I know is it’s annoying.

im using a local script i will try using a serversides script for this but i dont see how it affects it!

EDIT: i used a server script and the result is the same any other opinion?

I wouldn’t recommend using a local script to change the player’s position unless you want it to be on the client side. I’m unsure why changing the Cframe wouldn’t work though.

Maybe just using position it will work?

plr.Character.HumanoidRootPart.Position = workspace.wakeupbedplrtp.Position

nope ive tried that already. My problem is that after the teleport my character isnt moving properly

Can you record a video showing us the issue?

i fixed it. Turns out that the problem was another script that intefered with the camera at the same time as the current script so all i had to do was stop the camera script after everything was finished

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.