Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Press Q to equip weapon. I tried but my script did not work could anyone help me ?

Asked by
Gingerely 245 Moderation Voter
5 years ago
Edited 5 years ago

So I made this script. However in input it says Equipped/equip is not a valid member of tool. I know I did something wrong and maybe it sounds funny and stupid to some of you. But I'am new to scripting. So here is the script

local player = game.Players.LocalPlayer local UserInputService = game:GetService("UserInputService") local Q = Enum.KeyCode.Q local function IsQDown() return UserInputService:IsKeyDown(Q) end local function Input(input, gameProcessedEvent) if not IsQDown() then player.Backpack.ClassicSword.Equipped = false else player.Backpack.ClassicSword = true end end UserInputService.InputBegan:Connect(Input)

0
As i asked last time do you have a discord. I'm going to need to see some screenshot to properly help MrCatDoggo 213 — 5y
0
Gingerely#7439 Gingerely 245 — 5y
0
A request has been sent MrCatDoggo 213 — 5y
0
Hey man you should format your code within Lua code blocks, that'd make it a lot easier to read. Thus, allowing more people to want and attempt to answer your questions :) Psudar 882 — 5y
0
"Equipped" isn't a property of tool, it's an event to see if a tool is equipped or not. nicktooner 119 — 5y

Answer this question