Trying to local change intvalue on clickdetector

My game requires alot of clickdetectors that change an intvalue called camera in replicated storage (Local) and teleport player. I have teleport working but I am having issues changing the value of the camera.


https://gyazo.com/f83a97d416ea3abe22f163958bd13ff9 I tried this script: image

Try intead mouseClick try MouseClick or MouseButton1Down

Nope, That didnt fix it :frowning: :frowning: :frowning:

If you’re changing the client’s camera based on the camera’s value, ensure you are changing it via a localscript. Inside the script I can see you’re calling script.parent for a clickdetector so its probably a server script. Add a localscript in StarterPlayerScripts for example and reference the clickdetector in workspace and just check if the player who clicked is the localplayer, then change the camera intvalue.

That solution worked, thank you so much!