Hi guys, im working on a gun game right now. I wanted to make a two hand gun holding system. I made a script. This script:
local tool = script.Parent
local player = game.Players.LocalPlayer
local animation = tool.Animations:WaitForChild("Holding")
local animTrack
tool.Equipped:Connect(function()
print("Tool equipped")
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
animTrack = humanoid:LoadAnimation(animation)
print("Animation loaded:", animTrack)
animTrack:Play()
print("Animation played")
end)
tool.Unequipped:Connect(function()
if animTrack then
animTrack:Stop()
animTrack = nil
print("Animation stopped")
end
end)
And its in this order shown on the picture. I made an animation and put the ID there. But when i actually equip the tool i dont see hands. Please help me