I want to make a tool move with a moon animation play when the tool is activated.
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Animation = script.Parent.Animation
local Tool = script.Parent
local Track = Character:FindFirstChildOfClass("Humanoid"):LoadAnimation(Animation)
Tool.Activated:Connect(function()
Track:Play()
end)
have not tested this but this should work
make sure that if its a group game the animation is owned under the group, if its a profile game u own the animation
Put the animation inside the tool?
yep. but its a moon animation does that change anything?
no it shouldnt affect anything
well now it says Anim is not a valid member of Tool âPlayers.Xxoof_oofoofxX.Backpack.Toolâ
if i change it from: âlocal Animation = script.Parent.Animationâ to: âlocal Animation = Tool:WaitForChild(âAnimâ)â then it says: âPlayers.Xxoof_oofoofxX.Backpack.Tool.LocalScript:6â: attempt to index nil with âFindFirstChildOfClassâ
I fixed it no need to help anymore thank you!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.