Can't chance Camera max zoom distance chance on death, any suggestions?
Asked by
5 years ago Edited 5 years ago
Creating a cool fps game and discovered a bug where the camera's max zoom distance won't go back to 20 after you click the deploy button in the loadout selection which chances it to 0. but I just don't know how to make a script whit a dead function in it that activates the thing that the camera mode changes to 20 so it will save that on the next respawn so that PC gamers can interact whit the loadout screen again. Because PC users can not interact whit the GUI when fully zoomed in. What I want is that when you die, the max zoom distance goes to 20 before respawned so it saves that in order to interact whit the GUI on respawn.
Heres the code I made but just doesn't seem to work:
1 | game.Players.LocalPlayer.died:connect( function (ondeath) |
2 | game.Players.LocalPlayer.Cameramaxzoomdistance = 20 |