So im creating a game, a sorta adventure/obby game, and im trying to make it so the camera position changes when the trigger is touched for a little tutorial, but it just wont work and I have no idea why! Iv tried this in local and normal script. I have no idea if im just being stupid or i have its completly wrong. Any help will be appreciated iv tried fixing this issue for many days and im way too frustrated (name of the camera block is OrcCamera) code (in normal script in the trigger block):
local camera = workspace.Camera
local cutcamera = workspace.OrcCamera
script.Parent.OnTouched()
workspace.Camera.CameraType = Enum.CameraType.Scriptable
repeat wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = cutcamera.CFrame
script.Thud.Playing = true
wait(3)
script.Thud.Playing = false
camera.CameraType = Enum.CameraType.Custom

3 comments
This worked perfectly, thank you so much, been stuck on this for so many days and couldnt make any more advancments, so thank you so much
No problem!
No problem!