I'm not that sure what to title the Question but i'll explain.
So, I'm fairly new to creating Camera Manipulation. My goal was to manipulate the camera when the detector is enabled, and after 3s, will go back to the player.
I've placed the script in StarterPlayerScripts, and is a LocalScript.
The Outcome was that it did not work at all.
local detector = game.workspace.BlahBlah local camera = game.workspace.CurrentCamera local camerapart = game.workspace.CameraPart local player = game.Player.LocalPlayer if detector.Enabled == true then camera.CameraType = "Fixed" camera.Focus = camerapart.CFrame wait(3) camera.CameraType = "Custom" camera.CameraSubject = player.Character.Humanoid end
You could do:
detector:GetPropertyChangedSignal("Enabled"):Connect(function() if detector.Enabled == true then camera.CameraType = "Fixed" camera.Focus = camerapart.CFrame wait(3) camera.CameraType = "Custom" camera.CameraSubject = player.Character.Humanoid end end)
:GetPropertyChangedSignal Detects when the detectors value is updated, and if it equals true, then it'll continue doing what you want.