✓ Accepted answer
This is a classic, unfortunately, I'm not sure if ROBLOX did this or why, but I believe they've deprecated the .Activated method of Tool. So to temporarily fix this, use a MouseClick event; it's best to apply this method with UserInputService to allow us to use the GameProcessed method to ignore a Click [for example] of a GUI, or more generically a ClickDetector.
local UserInputService = game:GetService("UserInputService")
local Tool =
Tool.Equipped:Connect(function()
UserInputService.InputBegan:Connect(function(InputObject, GameProcessed)
if (InputObject.UserInputType == Enum.UserInputType.MouseButton1) then
if not (GameProcessed) then
local char = script.Parent.Parent
local track = char.Humanoid:LoadAnimation(script:WaitForChild("Animation")
track:Play()
end
end
end)
end)
Hope this helps out! don't forget to accept and upvote! anything confusing? Comment!
If these are new to you, consider reading about them here: UserInputType, UserInputService
4 comments
Is RequiresHandle set to false?
It isn't set to false it is on true
what kind of script did u write it in? Script or Local Script
Local script