ShiftLock problem when teleporting behind player

I’m making a script where you teleport behind another player while facing the players direction; however, when i use it with shiftlock it doesn’t rotate my player. I’ve used Cframe.new(pos, lookat) and HRP.CFrame * CFrame.new(0,0,2). Is there any solutions to this?

1 Like

Why don’t you just disable the ShiftLock in the StarterPlayer settings?

But I want shiftlock on it just causes a problem with this one script.

You can disable it before the teleportation happens then enable after the player is teleported.

Before you teleport the player…

player.DevEnableMouseLock= false

After you teleport the player…

player.DevEnableMouseLock= true
1 Like

Oh I didn’t know you could do this, thanks

1 Like

Wait should I be putting this in the client or server?

Put it in the script you are teleporting in.

It says enable mouse lock is not a valid member

Oh sorry, it was my bad, instead of EnableMouseLockOption it should be DevEnableMouseLock

Okay so this is odd but when I disable it behaves just like it would if it was enabled but instead of the circle thing its now a pointer.

Sadly that is a roblox bug I can’t find a solution for. Disabling the option to enable it was my best suggestion.

Okay thanks for your help anyway

1 Like