I'm trying to make this
this is my script
01 | local tool = script.Parent |
02 | local Player = game.Players.LocalPlayer |
03 | local UIS = game:GetService( "UserInputService" ) |
04 | local debounce = false |
05 |
06 | tool.Equipped:Connect( function () |
07 | print ( "Tool was equipped" ) |
08 | local Character = Player.Character |
09 | local Idle = Character:WaitForChild( "Humanoid" ):LoadAnimation(script.IdleAnim) |
10 | Idle:Play() |
11 | UIS.InputBegan:Connect( function (key, gpe) |
12 | if gpe then return end |
13 | if key.KeyCode = = Enum.KeyCode.Z and debounce = = false then |
14 | debounce = true |
15 | script.Parent.FireEquip:FireServer(debounce) |
why doesn't it work?