I have an animation that plays whenever a player touches a part. It acts like a jumpscare. When you see it from server-side (in-game) it looks completely fine. But when I view it from the client-side, it spins around my camera like CRAZY! I don’t know why this happens, please help.
SERVER SIDE
CLIENT SIDE
CODE USED FOR CUSTOM CAMERA
local HumanoidRootPart = char.HumanoidRootPart
local Head = char.Head
local Offset = Vector3.new()
RunService.RenderStepped:Connect(function (DeltaTime)
Offset = Offset:Lerp((HumanoidRootPart.CFrame + Vector3.new(0, 1.5, 0)):PointToObjectSpace(Head.Position), DeltaTime * 20)
Humanoid.CameraOffset = Offset
end)
Nope, I only used the camera to view the pov of the player. In the game, I ran a RenderStepped so that the CFrame was always at the head of the player.
try using tweens instead of lerp, or just set offset to (HumanoidRootPart.CFrame + Vector3.new(0, 1.5, 0)):PointToObjectSpace(Head.Position) without lerp.