local player = game.Players.LocalPlayer local mouse = player:GetMouse() local tool = script.Parent local function Activated () player.Character.Humanoid:LoadAnimation(tool.Equip) player.Character.Humanoid:LoadAnimation(tool.Idle) local target = mouse.Target if target then local remoteevent = target:FindFirstChild("RemoteEvent") if remoteevent then remoteevent:FireServer() end end end local function Deactivated () player.Character.Humanoid:LoadAnimation(tool.Unequip) end tool.Activated:Connect(Activated) tool.Deactivated:Connect(Deactivated)
There's no errors, all animations are placed in the tool like they should be. How I made my animations: I have a tool and placed the handle of it inside an r15 block rig, and used tool grip (plugin) to align it, then used custom character creator (plugin) to bind the handle to the right hand. after that I made the animations and saved it to roblox. Then I inserted animation (object) to the tool and edited the animationid.
To make animations, you have to insert an animation into the script with the ID as it's value, and reference it in the script like this.
local animation = script.Animation local AnimationTrack = Humanoid:LoadAnimation(Animation) --- You need to load the animation, so you do this. AnimationTrack:Play() --- playing the animation.
Also you should just set a variable for humanoid instead of doing Player.Character.Humanoid