Effective way to make a weapon?

I want to make a simple, yet functioning weapon system, but don’t know what to use.

Do I spawn parts at high speeds, and delete them if they hit a part other than a player? Do I use raycasting? What’s the thing here?

This is more of a general question, I need it rather quickly, but it isn’t a burning matter.

1 Like

What kind of weapon? A blade or a firearm or something else?

If you mean Firearms, i Recommend using Fastcast Redux for physical bullets.

Using Raycasting is creating a hitscan weapon. This one is instant action and is mostly used for simple games that don’t really focus that much on guns

And for a blade i recommend using Raycast Hitbox V4.

(Sorry if my reply kinda sucks, im new here)

1 Like

I’d recommend taking a look at FastCast and PartCache, they do great projectile simulation and performance considerations.

But a more basic way of creating a projectile is, yes, creating a part and sending it off at a speed. You might use LinearVelocity and the Touched (or PartsInBoundBox) event or maybe CFrame and raycasting.
That’s two ways. Before I switched to FastCast I moved parts using CFrame and raycasting in front of and behind the part. It definitely worked but my problem was making a part visible while making it appear to move quickly–moving a part too small a distance makes it visible but it’s slow and moving too large a distance makes it fast enough but it looks more like it’s teleporting than flying through the air.

If you want melee weapons you can try various hitbox systems, I know there’s ClientCast and the Raycast Hitbox. I remember there are some region modules that accurately detect parts within them, I’m talking player-made modules other than Region3 and spacial queries.
I personally use spacial queries because as far as I understand ClientCast and Raycast Hitbox rely on moving parts whereas I do not use those.

2 Likes

A firearm, yes. (dumb character rule)

1 Like

Is there a link to fast cast or something?

1 Like

The Fastcast Redux link as provided by @randomfellita.
From there take a look at a tutorial to set it up.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.