How do I fix character being flung after teleport to a different position

Hello,
I nedd help with this bug, after I teleport the character it flings you when you move around before it. I have tried to fix this by making the velocity 0 but it doesnt work.
And this is the code:

player.Character:PivotTo(plates:GetPivot() * CFrame.Angles(math.rad(-90), 0, 0) + Vector3.new(0, 5, 0))
					player.Character.HumanoidRootPart.Velocity = Vector3.new(0, 0, 0)

any help is appreciated!

1 Like

The reason this occurs is that the character rotates to the orientation of the model from which you’re obtaining the pivot, causing you to be flung away. To fix this, you should update your code to this:

player.Character:PivotTo(CFrame.new(plates:GetPivot().Position)*CFrame.new(0,5,0))

What sets this code apart is that it solely extracts the position, rather than the rotation as you were doing in the old code.

nope it still sadly doesnt work IDK why. it frustrates me

have you tried to do this?

Humanoid:ChangeState(8)

this also doesnt work idk why but the plate just acts like a conveyor belt

I can’t really do anything based on that description. Are you able to send any .rbxm or .rblx files so I can check why it’s happening?

What are .rblx or rbxm files? idk how to download that

I meant the place file. Here’s how you can get one if you don’t know how.

image


i dont have this option, should i just download a copy?

Yes, download a copy. That works as well.

If you step on the plate Part does it push the player?
If an Anchored Part has a velocity in it then it will act like a conveyor belt. Take a look at the lower propeties of the plate. All of your velocities should be 0,0,0.

i know but the thing is that it does not have a velocity

It’s working perfectly fine.

I’m not encountering the problem that you showed in the video at all.

What happens while testing if you just walk across the baseplate onto the button?

I think my studio is cursed i will try this in normal roblox

This might just be a loading time problem.

The baseplate probably gained velocity from your character while it was walking or while you were in the air. Make sure to go through every basepart inside the baseplate you are using and remove all rotation velocity and velocity. This should fix the problem.

1 Like

Why should i go through the descendents of the baseplate because my baseplate doesnt have any children

OOH I KNOW WHAT YOU MEAN, I see the problem now!

1 Like

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