- What do you want to achieve? Keep it simple and clear!
I’m in the early stages of making a gun system, I’m trying to make this gun weld to the view model arms properly. It is supposed to look like this.
-
What is the issue? Include screenshots / videos if possible!
The Motor6D gets set to -0, 90, 90 instead of the intended value of 90, 90, 0
This is in the configuration module script for the gun.
config.offset = CFrame.new(Vector3.new(0.2, 1.3, 0)) * CFrame.Angles(math.rad(90), math.rad(90), 0)
This is in the client-side module script for the gun system.
local grip = Instance.new("Motor6D")
grip.Part0 = viewModel_arms:WaitForChild("RightArm")
grip.Part1 = viewModel_gun.PrimaryPart
grip.Parent = viewModel_arms
grip.C0 = config.offset
Any help is appreciated, I’ve been stuck on this for a while now.
I remember already trying these two methods, but they have the same issue.
config.offset = CFrame.new(Vector3.new(0.2, 1.3, 0), Vector3.new(math.rad(90), math.rad(90), 0))
config.offset = CFrame.new(Vector3.new(0.2, 1.3, 0), Vector3.new(0,0,0)) * CFrame.Angles(math.rad(90), math.rad(90),0)
I’m very tired right now, I apologize if I am missing anything, let me know if you need more details about anything and I will provide them.