I made a part that clones a local script into the player on touch since a local script is needed for camera manipulations. This is the code inside the local script(I am using the camera's focus):
local cam = workspace.CurrentCamera function lookOverThere() cam.Focus=CFrame.new(game.Workspace.camManipulations.cameraPos.Position) end game.Workspace.camManipulations.cameraChange.Touched:connect(lookOverThere)
After correcting a bunch of errors to the point where no more are being outputted, the local script still does not work.
In closing I have three questions that I hope get answered: 1) Is there any way to ensure that local scripts do not have errors and will work. 2) How can this local script inside the PlayerGui be corrected and improved to work. 3) Is there any way to possibly tween the camera to give it more of a realistic look other than instantaneously changing the camera to a different angle.
Thank you in advanced
1) Is there any way to ensure that local scripts do not have errors and will work.
Running them in Server Testing, which displays the errors as if they were live. To do this, go to the Test Tab and clicking the 'Start' Button. There are some configs right next to it that can help you out if you need them.
2) How can this local script inside the PlayerGui be corrected and improved to work.
local t = game.Workspace.camManipulations --Used this for a fast defining local cam = game.Workspace.CurrentCamera t.cameraChange.Touched:connect(function() cam.CameraSubject = t.cameraPos --Gives Camera a subject cam.CoordinateFrame = t.cameraPos.Position --Takes to the cameraPos position * CFrame.new(0, 0, 0) --Moves the camera on a X, Y, Z axis.
3) Is there any way to possibly tween the camera to give it more of a realistic look other than instantaneously changing the camera to a different angle.
You could use loops and variable to move the position of the camera to give it more of a realistic look.