01 | local UIS = game:GetService( "UserInputService" ) |
02 | local p = game.Players.LocalPlayer |
03 | chain = 0 |
04 |
05 | --//Animations |
06 | local combat 1 = Instance.new( "Animation" ) |
07 | combat 1. AnimationId = "http://www.roblox.com/Asset?ID=1530711495" |
08 | local animTrack 1 = p.Character.Humanoid:LoadAnimation(combat 1 ) |
09 | -- |
10 |
11 |
12 | local function Combat(Input, gameProcessedEvent) |
13 | local KeyCode = Input.KeyCode |
14 |
15 | if KeyCode = = Enum.UserInputType.MouseButton 1 and script.canAttack = = true and chain = = 0 then |
It looks fine, It could be that canAttack is false or maybe you can use classic mouse functions instead of UserInputService.