#how to do weapons

1 messages · Page 1 of 1 (latest)

ancient bay
#

Im making a combat game, but i need to know how to make the weapons do stuff.

theres multiple stuff i want

A. normal m1
B. finisher/glory kill
C. quick finisher/stomp
D. a way to flex your brand new weapon

the part im stuck on is how to do hitboxes, or should i do them.

please keep in mind im a beginner that doesn't know much about scripting.

iron tideBOT
#

studio** You are now Level 1! **studio

sick citrus
thorny condor
#

Fr

#

And if you want to make it yourself then learn scripting, it will be better long term

gilded escarp
sick citrus
#

learn scripting

thorny condor
#

Fr

sick citrus
#

Fr

west bane
#

just do

#

raycasts

#

or .Magnitude

ancient bay
#

what

west bane
#

search it up

#

.Magnitude is more basic

#

but raycasts do have their positives

ancient bay
#

isnt a raycast a thingy that spawns in a thingy that checks a thing

west bane
#

to another part

#

if theres something in the way

#

it tells you

#

.Touched is super buggy

ancient bay
west bane
west bane
#

He asked HOW to do it

ancient bay
#

ok bruh how

west bane
ancient bay
#

but*

#

alr

west bane
#

im telling you the most basic hitbox system

ancient bay
#

is the raycast a hit box infront of the player, or on the weapon itself?

west bane
#

torso, humanoidrootpart, a part in front of the player or even the weapon itself

#

tbf ive never used rays for hitbox systems

#

so idk much about them

#

but ik they work

sick citrus
west bane
#

which does not say much

ancient bay
#

i known the basics

#

jus not combat and stuff

west bane
#

yeah

#

if I dont know metatables

#

and someone says "learn scripting"

#

that does not help

sick citrus
ancient bay
#

it isnt?

#

😭

west bane
#
print("make a game that will get 10k concurrent players")
#

paste this

#

it'll work

ancient bay
#

alr

#

and now, the waiting game.

west bane
#

gl

#

on ur system

iron tideBOT
#

studio** You are now Level 2! **studio

ancient bay
#

oh boy

terse idol
#

i would start with making a module, you can use things like workspace:GetPartBoundsInRadius(position, radius) which returns a table of all parts in an area

#

(modulescript)

#

btw if you dont know you can make a modulescript function by doing this for example:

local module = {}
function module.function(param)
  print(param)
end
return module

and if you want to use it in another script, you will have to use require() to actually do it
for example;

local module = require(game.ReplicatedStorage.module)
module.function("string")

it should print "string" in the output

gilded escarp
#

to do

ancient bay
#

i know how to do a basic module

#

ive done it before