Hey! I’ve been trying to change the CameraMode and mouse using scripts and if statements. However, whenever I change the value manually or use a script of the StringValue it won’t change. I’ve tried looking up ways to do it with attributes, but i’m not very familiar with them so I couldn’t figure it out. Is it just that Values are not used anymore or did I do something wrong scripting wise? I’ve looked at many forums and API references but none have seemed to work. Any help appreciated.
I’ve never tried boolean values before, the API reference explains very little on how it actually works. From the looks of things there’s no way to make the value False/True, how would I do this?
So for the most part it seems to be working, kinda. I can change the value to change between and it will do so, but now when I have the mouse visible and the CameraMode classic, the mouse stays in the middle. Is there a way to fix this?
Since you can’t set a bool value (MouseIconEnabled is a bool) to a string. I don’t think it will error (should just default since you gave it the wrong value), so thats not the issue.
Can you show us how you change the value? Are you just going to the same script in StarterPlayerScripts and editting the value there?
Know that the actual script running isn’t the one you see in StarterPlayerScripts. The actual script will be cloned from StarterPlayerScripts into the players “PlayerScripts” folder when they join.
I’m aware that it moves into the PlayerScripts, but I have the script that will be changing the bool value in StarterGui, which moves to PlayerGui too. I haven’t written code for the changing of the value inside the StartButton script as I was mainly trying to fix this script.
Another thing should I be using a different method to change the cursor to be still and invisible to movable and visible? My game is a First Person game with no mouse, so I thought I would just change the CameraMode. Is their an easier way to do it, because if I switch between the two my mouse always remains in the middle and the CameraMode has been changed in my player.
Edit: forgot to mention that I will have the cursor visible when a gui is on screen and the gui takes up the whole screen.
Yeah thats what someone told me to do and it worked for the most part. But my mouse cursor just stays in the middle when I switch from lockfirstperson and classic.