local UIS = game:GetService("UserInputService") local p = game.Players.LocalPlayer chain = 0 --//Animations local combat1 = Instance.new("Animation") combat1.AnimationId = "http://www.roblox.com/Asset?ID=1530711495" local animTrack1 = p.Character.Humanoid:LoadAnimation(combat1) -- local function Combat(Input, gameProcessedEvent) local KeyCode = Input.KeyCode if KeyCode == Enum.UserInputType.MouseButton1 and script.canAttack == true and chain == 0 then print("wow") animTrack1:Play() end end UIS.InputBegan:Connect(Combat)
It looks fine, It could be that canAttack is false or maybe you can use classic mouse functions instead of UserInputService.