✓ Accepted answer
Well first of all you put an if statement on the very top saying if Key == "t" and canUse == true then this will not let the function go any farther because you never made a Variable called Key so it will just not work. However, if you tried to make it something like if when the Character presses t then the function runs well for that to work first off you need to make it so that the function connects to an event called KeyDown which is now deprecated so you would have to use something like UserInputService or ContextActionService. However, if I were you I'd learn about both of those and then use them to your games benefits. Well, I wish you good luck but, I'd say that if statement is what's preventing the script from working.
Thank you for reading this answer and I hope it helped you out even if it was a little.
~~KingLoneCat
1 comment
http://wiki.roblox.com/index.php?title=Keyboard_input