The script is like a magic move that you can use on others and I want to be able to press T then click on the target and work and this is the script I am currently using:
local player = game.Players.LocalPlayer
repeat wait() until player.Character.Humanoid
local humanoid = player.Character.Humanoid
local mouse = player:GetMouse()
local UIS = game:GetService("UserInputService")
local anim = Instance.new("Animation")
anim.AnimationId = "https://www.roblox.com/asset/?id='5480157154'
mouse.KeyDown:connect(function(key)
if key == "t" then
local playAnim = humanoid:LoadAnimation(anim)
playAnim:Play()
end
end)
If you know please do answer below as I am eager to find out. the solution.

2 comments
use userinputservice
dont use keydown , use UserInputService, you literally required it