-
What do you want to achieve? i Want to make FPS system .I want to make arms point at the camera Direction with Motor6D enabled
-
What is the issue? Arms are not Cframed right
Here is without Motor6D disabled
https://i.gyazo.com/70a5ad9ae6168b857acdd136c7cafbeb.mp4
and here is with Motor6D enabled
- What solutions have you tried so far? i Searched in the devforum but didnt find anything helpful
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character.Humanoid
local Torso = character.Torso
local RightArm = character["Right Arm"]
local LeftArm = character["Left Arm"]
local cam = workspace.CurrentCamera
local m6dR = Torso:WaitForChild("Right Shoulder")
local m6dL = Torso:WaitForChild("Left Shoulder")
local Mesh = script:WaitForChild("Mesh")
local NewMesh = Mesh:Clone()
NewMesh.Parent = RightArm
local NewMesh2 = Mesh:Clone()
NewMesh2.Parent = LeftArm
game:GetService("RunService").RenderStepped:Connect(function()
if (Torso.Position - cam.CFrame.Position).magnitude < 2 then
local RA = cam.CFrame * CFrame.new(2,-1,-3) * CFrame.Angles(math.rad(90),0,0)
local LA = cam.CFrame * CFrame.new(-2,-1,-3) * CFrame.Angles(math.rad(90),0,0)
m6dR.C1 = RA:Inverse()
m6dL.C1 = LA:Inverse()
RightArm.Mesh.Scale = Vector3.new(1,1.75,1)
RightArm.Mesh.Offset = Vector3.new(0,0.75,0)
LeftArm.Mesh.Scale = Vector3.new(1,1.75,1)
LeftArm.Mesh.Offset = Vector3.new(0,0.75,0)
else
RightArm.Mesh.Scale = Vector3.new(1,1,1)
RightArm.Mesh.Offset = Vector3.new(0,0,0)
LeftArm.Mesh.Scale = Vector3.new(1,1,1)
LeftArm.Mesh.Offset = Vector3.new(0,0,0)
end
end)
Thanks for all responds