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.