Hey there! I've been messing up with camera manipulation because I wanted to make a script that makes the camera follow a part, and everything is working fine. But there is something I don't like. It's not really a glitch or anything, It's actually that the camera isn't completely "smooth". When the part moves, the camera moves, and I can notice like a "trail" of the ball's movement. It is a bit "ugly" to see the ball like a laggy car. When I use cars in ROBLOX, I don't notice any trails. Is there anyway to make a camera move more "Smoothly"?
local cam = nil local ball = nil script.Parent.MouseButton1Click:connect (function () game.ReplicatedStorage.PlayerPlaysHole1:FireServer(game.Players.LocalPlayer) local ball = game.Workspace.MinigolfBalls:WaitForChild("Ball".. game.Players.LocalPlayer.UserId) local cam = game.Workspace.CurrentCamera cam.CameraType = Enum.CameraType.Scriptable cam.CameraSubject = ball while true do wait () cam.CoordinateFrame=CFrame.new(ball.CFrame.X, ball.CFrame.Y + 5, ball.CFrame.Z + 10) end end)
For if you ask, the client has network ownership.
Camera renders 60fps but wait() is 30fps, so it is not synced; 'laggy'.
You want: BindToRenderStep
--threw in some efficiency local RS = game:GetService("RunService") local zoom = Vector3.new(0,5,10) RS:BindToRenderStep("asdf",Enum.RenderPriority.First.Value,function() cam.CFrame = CFrame.new(ball.CFrame.p+zoom) end)