There’s this bug that’s been going around with my game ever since I made my first update.
In this game, you spawn as a custom character which you choose, and each character has their own weapon (A tool).
The thing is, the animations are connected with several Motor6D’s (1 for the Right Arm), another for the Left Arm if the weapon is dual wielded.
The way it works is that the Right Motor6D is connected to the Right Arm and the BodyAttach (main part of the weapon), but for some reason, sometimes the weapon moves inside the character’s stomach, but this doesn’t happen with the weapon on the left (In case the character is dual wielding.)
This is what should happen (and it happens most of the time.)
This is when the bug happens sometimes.
This is my Local Script (Since the only affected Motor6D is the one at the right.)
local toolGrip = Character:WaitForChild("Right Arm"):WaitForChild("ToolGrip")
local bodyAttach = Tool:WaitForChild("BodyAttach")
local function fire(...)
game.ReplicatedStorage.Remotes.ConnectM6D:FireServer(...)
end
Tool.Equipped:Connect(function()
fire(bodyAttach)
toolGrip.Part0 = Character["Right Arm"]
toolGrip.Part1 = bodyAttach
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
wait(Module.EquipTime)
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
end)
Tool.Unequipped:Connect(function()
fire()
end)
This is my Server Script.
game.ReplicatedStorage.Remotes.ConnectM6D.OnServerEvent:Connect(function(p, location, secondlocation)
if p and p.Character and p.Character:FindFirstChild("Right Arm") and p.Character["Right Arm"]:FindFirstChild("ToolGrip") then
p.Character:WaitForChild("Right Arm").ToolGrip.Part0 = p.Character:WaitForChild("Right Arm")
if location then
p.Character:WaitForChild("Right Arm").ToolGrip.Part1 = location
else
p.Character:WaitForChild("Right Arm").ToolGrip.Part1 = location
end
end
if p and p.Character and p.Character:FindFirstChild("Left Arm") and p.Character["Left Arm"]:FindFirstChild("ToolGrip") then
p.Character:WaitForChild("Left Arm").ToolGrip.Part0 = p.Character:WaitForChild("Left Arm")
if secondlocation then
p.Character:WaitForChild("Left Arm").ToolGrip.Part1 = secondlocation
else
p.Character:WaitForChild("Left Arm").ToolGrip.Part1 = secondlocation
end
end
end)
I’ve tried many things from other topics, I even tried changing the C0 of the Motor6D, but then it just makes the tool move out of place, I’m getting desperate…