I am making a plot selection system, where it tweens the camera to the plot when you click the arrows. However, whenever i tween the camera toward the part it stays there for like 1 second then goes back to my character and returns this error: RunService:fireRenderStepEarlyFunctions unexpected error while invoking callback: PlayerScripts.PlayerModule.CameraModule.BaseCamera:742: invalid argument
If you have a answer to this problem feel free to comment your solution down below.
Hi there, did you change the CameraMaxZoomDistance for the Player?
If so to what value did you set it?
And your script to what Vector does it want to set the Camera
The Default Camera Zoomout is 400 studs - maybe you are setting the camera to high up;
I have had the same problem and it fixed when i put the Vector3.new(0,–make this coordinate lower,0) and the Error disappeared and it worked smoothly for me
Just try out when you set the 2nd Vector or Y, lower which one works for you
local Camera = workspace.CurrentCamera
local Plots = workspace:WaitForChild(“Plots”)
local CameraModule = require(script.Parent.CameraModule)
local CameraModule2 = require(script.Parent.CameraModule2)
local BaseCamera = require(script.Parent.BaseCamera)
local CameraUtils = require(script.Parent.CameraUtils)
local PlayerGui = script.Parent.Parent
local Mouse = PlayerGui.PlayerGui.ScreenGui.Mouse
local Plot = script.Parent.Parent.PlayerGui.PlotGui.Plot
local selectedplot = 1
local SelectedPlots = Plots:GetChildren()
local LeftButton = script.Parent.Parent.PlayerGui.PlotGui.LeftButton
local RightButton = script.Parent.Parent.PlayerGui.PlotGui.RightButton
function TweenCameraToPlot(number)
if selectedplot + number > 0 and selectedplot + number < 6 then
selectedplot = selectedplot + number
elseif selectedplot + number < 1 then
selectedplot = 5
elseif selectedplot + number > 5 then
selectedplot = 1
end
local PlotSelected = SelectedPlots[selectedplot]
local cameraChange = Instance.new(“NumberValue”)
cameraChange.Name = “CameraChange”
local CameraTween = TweenInfo.new(1)
cameraChange.Parent = Camera
local CameraCF = CameraModule.GetCameraFocusPoint(Camera)
local CameraCFP = CameraCF.p
local CameraCFR = CameraCF.r
local CameraCFO = CameraCF.o
local CameraCFA = CameraCF.a
local CameraCFRa = CameraCF.ra
local CameraCFZa = CameraCF.za
local CameraCFTarget = PlotSelected.CFrame
local CameraCFTargetP = CameraCFTarget.p
local CameraC