I’m trying to make a script that monitors the player’s cameraMode to see if its set to Follow, and to see if the player changes it again. How can I make it actually work? .Changed isn’t an attribute of ComputerCameraMovementMode, and I don’t know any workarounds to .Changed.
this is the script:
local UserSettings = game:GetService("UserSettings")
local function CheckCameraModeChange()
print("Mode Changed")
if UserSettings().GameSettings.ComputerCameraMovementMode == Enum.ComputerCameraMovementMode.Follow then
print("oop u did it")
local Message = Instance.new("Message")
Message.Parent = game.Workspace
Message.Text = "Nice try bud, but you ain't gonna get away that easy"
end
end
UserSettings().GameSettings.ComputerCameraMovementMode.Changed:Connect(CheckCameraModeChange)
-- Local script parented to StarterCharacterScripts
local plr = game.Players.LocalPlayer
plr:GetPropertyChangedSignal("CameraMode"):Connect(function()
print("oop u did it")
local Message = Instance.new("Message")
Message.Parent = game.Workspace
Message.Text = "Nice try bud, but you ain't gonna get away that easy"
end)
I tried it just now, but still nothing (i tried sending a video but it didnt work ;-; )
I put the localscript in StarterCharacterScripts but it didnt print / do anything when i changed my cameraMode
How is that possible, let me test it… Edit: Tested it, did you actually change the camera mode? It only works if the camera mode has been changed. Edit 2: Just tested it by changing my camera mode and it worked.
Ah yeah, cameramode from the esc menu and cameramode from roblox scripts are different. I’m not sure how to access THAT cameramode. Edit: Doesn’t seem to be a property for it, the closest thing to it is DevTouchCameraMode and other properties.