First off; you're definitely missing an end in that function, which in and of itself might be your only problem. Another reason the script isn't working might be that your Backpack and mouse aren't defined. To do so, use;
1 | Player = game.Players.LocalPlayer |
2 | mouse = Player:GetMouse() |
3 | Backpack = Player.Backpack |
Lastly, KeyDown is deprecated, and it would be in your best interest to use 'UserInputService'. In your example, you could use the following code;
01 | Player = game.Players.LocalPlayer |
02 | mouse = Player:GetMouse() |
03 | Backpack = Player.Backpack |
05 | serv = game:GetService( "UserInputService" ) |
06 | serv.InputBegan( function (input) |
07 | if input.UserInputType = = Enum.UserInputType.Keyboard and |
08 | input.UserInputState = = Enum.UserInputState.Begin then |
09 | if input.KeyCode = = Enum.Keycode.Q then |
10 | Move 1 = game.Lighting.Fireball:Clone() |
11 | Move 1. Parent = Backpack |