#How to make a gun with custom animations
137 messages · Page 1 of 1 (latest)
if you want the bullets to be visible, create a new thread
and for the custom animations, you can search it on google
i know, i said not to be raycasts
i tried searching how to make custom guns with custom animations but all the videos either dont work, aren't what i wanted or are completly unrelated
are you trying to make an animstion or play it?
if it is to make, #1006356488912121967
if it is to play then tell
i also need to make the gun itself and stuff, so i thought this would fit here
make a gun with blender.
i have the model
i have the animations
i need the scripting for the gun
then its impossible
unless u want it to shoot through the walls
there's tons of guns that dont have raycasts
a raycast is basically a laser, you can choose how far it goes, you need to decide it's position and orientation, a raycast can be used for many actions, for example killing players when they touch the raycast, or change the color of a part when it touched the raycast
yeahhh no
thats literally what a raycast is
take for example the WB kit, when you search it on the toolbox, theres many guns there, that dont use raycasts
and it shoots through walls
no i dont want it to shoot through the walls
then raycast it
dude
thats the cheapskate way to damage
you can make the part remove when it touches another part
cheapskate way also
its usefull for making entities you have to hide from
how is it cheapskate way
its the normal way, the easy way
everybody wants to go the easy way
exactly
just search WB on the toolbox and you will see many guns that dont shoot through walls and dont use raycasts
how you gonna get an advanced gun system going the easy way
wb is shitty
it still works
it does what i need
i need a system similar to that
but without the zooming in
im out
aight, seems like you just cant understand what i want and cant help me, if you cant help me then why did you come here in the first place
think about it
think about what? i dont want the bullets to instantly reach the target no matter how far it is, all good games DONT use raycasts for guns
use both
wdym use both
bullets travel faster then the speed of light
when you shoot, the gun creates a part
excuse me?
no?
dude
an average bullet travels at 0.9 mach speed
1 mach speed is 1 times the speed of sound
nothing is faster than the speed of light
if something reaches the speed of light, that object will turn into energy and not be physical anymore
so no, it would not be realistic
"When bullets fly through the air, they do so at amazing speeds. The fastest bullets travel more than 2,600 feet per second. That's equivalent to over 1,800 miles per hour. To put that in perspective, it's amazing to realize that bullets travel over twice the speed of sound!"
i meant sound
yeah, it does travel faster than sound
but, MOST bullets travel at 0.9 or 0.95 mach speed
making it almost instantly
pistols from assault riffler (like the AK-47) travel at about 2 mach speed
sniper riffle bullets travel at about 3 mach speed
machinegun bullets (like the minigun or railgun) travel at 4 mach speed
but most pistol bullets (9mm) travel at 0.1 mach speed
** You are now Level 6! **
102 miles per hour
so, not really that instant
and 1 stud is 0.25 meters
meaning 1 meter would be 4 studs
1km would be 4000 studs
0.1 mach speed is 163 km per hour
meaning it would travel at 652000 studs per hour
and 10k studs per minute
1.5 studs per second
1.5K*
btw my math is:
4000*163 = 652000
652000/60 = 10k
10k/60 = 1.6k
hope what i said helped even a little bit
so, basically how the gun would work is
when you click it plays the shooting animation
it duplicates a part inside the serverstorage that has a scipt to delete itself once it touches something and if that something is a player it deals damage
did this help?
why dont you want it raycasted
you can put a particle on the result.Position to show it has hit
no i mean like, see the bullet actually moving
and a muzzle flash on the gun
then the bullet would have to be slow
and since its slow
it wouldnt cover a lot of distance
making it fall
you have to give it a high velocity
dude
but you can still see it
making it like a raycast but more harder steps
it will be for 1 nanosecond and it would look less realistic
to play just load the animation with Animator:LoadAnimation(Animation)
and then play the loaded animation using AnimationTrack:Play()
ok but how do i make the idle animation
Animator is usually inside the HUmanoid
and running animation and all that shit
make a new post
new post
"how to make a gun with custom animations"
im pretty sure everyone would think it means a gun animation
nobody would think that
you should specify which type of animation it is
k
"to play just load the animation with Animator:LoadAnimation(Animation)
and then play the loaded animation using AnimationTrack:Play()"
example:
local anim = script.Animation
local humanoid = player.Character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local animation = animator:LoadAnimation(anim)
animation:Play()```