Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to prevent a player from turning their player with Mouse Lock?

I am making a chest script and when the player presses E to open the chest, they are positioned so that they are facing the chest.

I do not want the player to be able to turn in any way because it'll look unrealistic so I need help disabling mouse lock temporarily, or preventing the person from being able to turn at all, for that short moment.

The reason I need this is also because an animation will be played while opening the chest, so again, i need it to look as realistic as possible.

Gif of The Chest and My Issue

3 comments

2

I believe if you have a script that changes the current camera type to scriptable they won't be able to move it and you can change it back afterwards,

0

Thanks that worked!

0

Glad I could help.

1 answer

✓ Accepted answer

This question has been answered already. The solution for anyone who was wondering, was adding a script that would change the CurrentCamera type to Scriptable and then changing it back after the animation was over.

This discussion is preserved as it was. New answers, comments, and votes are closed.