I’m trying to make a weapon system, and I’m having problems with having the actual gun animations play.
The characters animations work fine but the gun isn’t having any changes for some reason. (I have all the welds and Motor6Ds done)
https://gyazo.com/4a8d0177538c41d958bbb4cfe9533db4
Clip what’s happening ^
https://gyazo.com/c7f7d6e280efc45da66100a038fd5e3e.png
Weld set-up ^
Client
local UIS = game:GetService("UserInputService")
local Players = game:GetService("Players")
local AnimationId = "rbxassetid://108077236635203"
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local tool = script.Parent
local NewAnimTrack = Instance.new("Animation", tool)
NewAnimTrack.AnimationId = AnimationId
local IdleAnimTrack = Character:FindFirstChild("Humanoid"):LoadAnimation(NewAnimTrack)
IdleAnimTrack.Priority = Enum.AnimationPriority.Action
IdleAnimTrack.Looped = true
tool.Equipped:Connect(function()
IdleAnimTrack:Play()
end)
tool.Unequipped:Connect(function()
IdleAnimTrack:Stop()
end)
ServerScript
game:GetService("Players").PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
wait()
local M6D = Instance.new("Motor6D", Character:WaitForChild("Torso"))
M6D.Name = "ToolAttach"
Character.ChildAdded:Connect(function(Child)
if Child:IsA("Tool") and Child:FindFirstChild("BodyAttach") then
M6D.Part1 = Child.BodyAttach
end
end)
end)
end)