Hi, im new to roblox scripting and this is my first question :)
I have a problem to call the weapon when i want to equip the weapon as i dont know the code for it to be called
repeat wait() until game.Players.LocalPlayer
m = game.Players.LocalPlayer:GetMouse()
m.KeyDown:connect(function(key) if key == "m" then -- i want the Weapon to be equip with the character when holding this print("Equip")
end end)
m.KeyUp:connect(function(key) if key == "m" then -- the weapon will be gone if key up print("Unequip") end end)
this is the basic code that i wrote. I'm sorry, but i dont know how to code a hotkey when i want to bring out the weapon. :( can you please help

5 comments
Put your script you tried, see this: https://scriptinghelpers.org/help/how-post-good-questions-answers
im sorry, i'll try again
Give us a script.
There
Use UserInputService or ContextActionService for player input.