How do you make a working gun in JS?

[ARGon] Explorer.
Joined 29/08/2020
Posts 8,229
10:30 PM 15/10/2022
I am trying to work on a game but I don't know how to make a gun using a mesh, I have seen the crimson blaster but it isn't necessarily what I am looking for due to the fact you can't give it a mesh and have it act like a gun

here is what I have so far:

let tool = new Tool("Pumpkin Launcher")
tool.model = 349406
Game.on("playerJoin", (player) => {
player.on("initialSpawn", () => {
player.equipTool(tool)
})
})
tool.on("activated", (p) => {

})


arlocomotive
Joined 10/01/2021
Posts 24
12:34 AM 16/10/2022
https://github.com/Brick-Hill-Developers/Community-Resources/blob/master/Weaponry/CrimsonBlaster.js


[LIVE] Ttv Kasdyl
Joined 08/10/2022
Posts 222
08:10 PM 18/10/2022
i have no clue


[ARGon] Explorer.
Joined 29/08/2020
Posts 8,229
10:44 PM 18/10/2022
Quote from Ttv Kasdyl , 08:10 PM 18/10/2022
i have no clue
Ok postfarmer.


arlocomotive
Joined 10/01/2021
Posts 24
02:47 AM 19/10/2022
Quote from Ttv Kasdyl , 08:10 PM 18/10/2022
i have no clue
Don't answer if you don't know.


[ARGon] Explorer.
Joined 29/08/2020
Posts 8,229
11:16 PM 20/10/2022
Quote from arlocomotive , 02:47 AM 19/10/2022
Quote from Ttv Kasdyl , 08:10 PM 18/10/2022
i have no clue

Don't answer if you don't know.
Facts bro!


[LIVE] Ttv Kasdyl
Joined 08/10/2022
Posts 222
07:54 PM 24/10/2022
you guys are smart


[LIVE] Ttv Kasdyl
Joined 08/10/2022
Posts 222
12:26 AM 25/10/2022
Suggggg


[LIVE] Ttv Kasdyl
Joined 08/10/2022
Posts 222
12:27 AM 25/10/2022
Ooooopppoooooop


[ARGon] Explorer.
Joined 29/08/2020
Posts 8,229
02:30 AM 25/10/2022
Quote from Ttv Kasdyl , 07:54 PM 24/10/2022
you guys are smart
I'm getting you banned/warned for this, ruining the forums isn't fun for people who genuinely need help on something. Post farmers like you are literally the reason people hate the forums.


[Brick] 1nator
Joined 11/10/2017
Posts 11,114
11:29 AM 21/11/2022
to give it a mesh just add the script with the one you have here and change the .mouseclick event (probably appears as either player.mouseclick or p.mouseclick) with tool.activated, and have the parameter of the .activated event (in your script its "p") be named the name that was written before the .mouseclick

1