I had this idea, the player spawns with a rod attached to their hand. I wanted the rod to be animatable so i used motor6Ds to attach it to a dummys left arm. I then attached the dummys arm to the players arm, and made the arm transparent so it simulates the player holding the weapon.
The rod is rigged to the dummys arm, and parented to the arm, so i dont have to rig the rod Via script.
Heres the script i used
--Local script
local player = game:GetService("Players").LocalPlayer
local character = player.CharacterAdded:Wait() or player.Character
local rodArm = game:GetService("Lighting").Assets["Rod Arm"]
local leftArm = character:WaitForChild("Left Arm")
local motor6D = Instance.new("Motor6D")
rodArm.Parent = character
motor6D.Parent = leftArm
motor6D.Part0 = leftArm
motor6D.Part1 = rodArm
After animating i created a script to play the animation on spawn. The original idea was that if the player presses Q the animation will play, but for some reason that didnt work.
local player = game:GetService("Players").LocalPlayer
local character = player.CharacterAdded:Wait() or player.Character
local animation = script.Animation
local humanoid = character:WaitForChild("Humanoid")
local animationTrack = humanoid:LoadAnimation(animation)
local UIS = game:GetService("UserInputService")
animationTrack:Play()
the script kind of works?
This keeps happening and im not sure why. I think the animation stops whenever the character moves but i dont knw how to prevent that.
Help would be appreciated! thank you for your time
–Note: I did not create the axe model