So first a little background information: I use @Headstackk’s way of animating guns and replicating animations for the viewmodel.
But when i equip this happens:
The CameraSystem code:
function module:Update(dt)
GunSystem.Events.Update:FireServer(CFrame.new(1,0.5,0) * CFrame.Angles(-math.asin((self.Mouse.Origin.p - self.Mouse.Hit.p).Unit.y),1.55,0), CFrame.new(-1,0.5,0) * CFrame.Angles(-math.asin((self.Mouse.Origin.p - self.Mouse.Hit.p).Unit.y),-1.55,0), CFrame.new(0,0,0) * CFrame.Angles(-math.asin((self.Mouse.Origin.p - self.Mouse.Hit.p).unit.y),0,0))
self.VMSpring:shove(self.Camera.CFrame)
local VMOffset = self.VMSpring:update(dt)
self.VM.PrimaryPart.CFrame = self.Camera.CFrame * CFrame.new(0, -1.3, -1)
if self.Character.Humanoid.Health >= 1 then
self.VM.Torso["Right Shoulder"].Transform = self.Torso["Right Shoulder"].Transform
self.VM.Torso["Left Shoulder"].Transform = self.Torso["Left Shoulder"].Transform
if (self.Camera.CFrame.p - self.Camera.Focus.p).Magnitude <= 0.6 then
self.CanAim = true
self.VM.Parent = self.Camera
if self.Character:FindFirstChildOfClass("Tool") ~= nil then
self.Torso.ToolGrip.Part1 = nil
self.VM.Torso.ToolGrip.Part1 = self.Character:FindFirstChildOfClass("Tool").BodyAttach
self.VM.Torso.ToolGrip.C0 = self.VM.Torso.ToolGrip.C0 * CFrame.new(0,0,0)
end
else
self.CanAim = false
self.VM.Parent = nil
if self.Character:FindFirstChildOfClass("Tool") ~= nil then
self.VM.Torso.ToolGrip.Part1 = nil
self.Torso.ToolGrip.Part1 = self.Character:FindFirstChildOfClass("Tool").BodyAttach
self.Torso.ToolGrip.C0 = self.Torso.ToolGrip.C0 * CFrame.new(0,0,0)
end
end
end
--self.Character["Right Arm"].LocalTransparencyModifier = 0
--self.Character["Left Arm"].LocalTransparencyModifier = 0
end
this is probably the issue as when you go in first person, the viewmodel is in the camera but then disappears after u go back in a slight third person mode but i dont see anything that indicates the VM is a clone
so i’m thinking this is the issue because everytime the module updates, it will go backwards by -1 and below by 1.3 while it is transformed to the character’s torso joints