Please help me. I'm Starter with Scripting and I don't know how to do this.
I want to make 2 Tools and make them switch when the Player press "Q" or "E".
oh, and sorry if my english is awful bc im brazilian :/
COMMUNITY QUESTION
How do I make a "Q" and "E" Backpack Switch?
1 answer
explainment at below answer:
PLEASE PUT THIS AS A LOCALSCRIPT OR IT WONT WORK!!!
keyQ = 'Q'
keyE = 'E'
local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local Char = plr.Character or plr.CharacterAdded:Wait()
game:GetService("UserInputService").InputBegan:Connect(function(inputObject,gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode[KeyQ] then
print(Key.."has been pressed", debug)
-- change gear script
end
if inputObject.KeyCode == Enum.KeyCode[KeyE] then
print(Key.."has been pressed", debug)
-- change gear script
end
end)
I'll type more later cuz i gonna sleep
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
im noob