Hi, im making a western game similar to RDR2 that relies on inverse kinematics to make it look nice
There is a target right now in the workspace that is supposed to be at the clients dead center of their screen, this would help the inverse kinematic point a gun properly.
My desired result:
What actually happens:
Code
local Part = workspace.Target
local Camera = workspace.CurrentCamera
local distance = 5
game:GetService("RunService").Heartbeat:Connect(function()
if Part ~= nil then
Part.CFrame = Camera.CFrame * CFrame.new(Camera.CFrame.LookVector * distance)
end
end)