Disable Mouse when I change my camera

I would like to make it so that when I go on a camera It will disable my mouse, I already know how to disable the mouse so I just need to know how to detect when my Camera changes, then activate the mouse disable code. Also this is in typescript.
Here is what I have so far:


(this is the disable mouse code)
(just got this off someone else project)


1 Like