want to make a gun game with gun animation but the handle is glithing here is the pics
here is what it looks like in the animating process
i am using two motor6D script i put one on the tool client and the other on ServerScriptStorage
The tool client script
script.Parent.Equipped:Connect(function()
local char = game.Players.LocalPlayer.Character
local GunTest = script.Parent
game.ReplicatedStorage.ConnectM6D:FireServer(GunTest.BodyAttach)
char["Right Arm"].ToolGrip.Part0 = char["Right Arm"]
char["Right Arm"].ToolGrip.Part1 = GunTest.BodyAttach
end)
local GunTest = script.Parent
GunTest.Unequipped:Connect(function()
game.ReplicatedStorage.DisconnectM6D:FireServer()
end)
the second script on ServerScriptStorage
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local M6D = Instance.new("Motor6D", char["Right Arm"])
M6D.Name = "ToolGrip"
end)
end)
local GunTest = script.Parent.Parent.Players.LocalPlayer.Backpack.GunTest
game.ReplicatedStorage.ConnectM6D.OnServerEvent:Connect(function(plr,location)
local char = plr.Character
char["Right Arm"].ToolGrip.Part0 = char["Right Arm"]
char["Right Arm"].ToolGrip.Part1 = GunTest.BodyAttach
end)
game.ReplicatedStorage.DisconnectM6D.OnServerEvent:Connect(function(plr)
plr.Character["Right Arm"].ToolGrip.Part1 = nil
end)
i took the script on this forum How to animate Tool Parts (Guns, Knifes etc.)
yes i am using RemoteEvent of ConnectM6D and DisconnectM6D on ReplicatedStorage respectively
i also disable RequiresHandle on tool
pls help me on this glitch