You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? A script that plays a animation when I click.
What is the issue? It wont play the animation, or my game wont. No matter of what type of script, or what type of tutorial I take it from. It wont play the animation. It even prints out to “Playing Animation”.
What solutions have you tried so far? Everything.
local Tool = script.Parent -- Defines tool
print("Before tool activated") -- Testing Where Script Ends
Tool.Activated:Connect(function() -- Function starts when tool clicks
local Char = Tool.Parent -- Gets player from tool
local Humanoid = Char:FindFirstChildWhichIsA("Humanoid") -- Get humaniod from player
print("After defining humanoid") -- Testing Where Script Ends
if Humanoid then -- checks if the thing has a humaniod
Humanoid.Health = Humanoid.Health - 2 -- Testing Where Script Ends
local animation = script:FindFirstChild("AnimationR6")
if animation then
print("Playing Animation") -- Testing Where Script Ends
local animationTrack = Humanoid:LoadAnimation(animation) -- Defeines animation numbers
animationTrack:Play() -- Should Play animation
else
print("AnimationR6 not found") -- Errors
end
else
print("Humanoid not found") -- Errors
end
end)
You need to own animation to use it. Also your group need to have it if game is from group, but it not always work in studio but it should work in game.
Hmmm how do i explain this.
From what i understand it is like animation overweight each other.When the one with higher priority play the lowers will still play but we can’t see it as the highest one overweight them all.
If two animations have the same priority both will play at the same time make the character moving at half of both animations.
You asked about that meaning you didn’t set the animation priority. In Animation editor, click the 3 dots you can see “Set Animation Priority” just set it higher than Core, which is roblox default animations using.