u really do show that u know what u are doing, no errors while explaining, no mistakes on the script, going straight to the point, great to teach new things (for example, i didnt have any idea about the "apply impulse", and now i always use it and the math log that i didnt had quite good idea about), u are one of the best programmers of roblox ever
You're one of the best scripting channels I seen, most of the tutorials you upload are things that are so useful that I didn't even think about!(I was going to use bezier curves for my projectile😅) Your tutorials are very helpful to me and many others, Hope you're having a wonderful day!
I was looking for this! I actually tried to program my own physics into Roblox -- however I had no idea I could completely override their physics engine. This is extremely useful, thank you.
Wow, I'm surprised youtube recommended this to me. This is amazing! You explained a useful concept that can apply to many things in a extremely simple way, while showing examples and graphs. Amazing!
exactly I dont know why other scripting channels seem to either be so simple and basic its not even useful and others are so complicated it feels like they dont even know what they are talking about and usually dont explain a thing not nearly as good as this guy, we need more scripting channels like him
thank you i had seen the phicis funtins in documentation but i didnt know how they worked so o just came up with my own way but i want to improve and was looking for helpful videos thank you you explained it vey well definetly gonna rewatch a couple of times
very well explained tutorial my friend. 💯👍 today i learnd a lot and bring it into a small game. every video that you made is so interesting and helpful.
Great tutorial! I do have a question (if you'll even respond on a year old video), i want the projectile to curve upward instead of not curving much, would I have to use the first method of duration or is there a way to do it with the final method?
Hi, thank you so much for the great tutorial! I have a question. I noticed that there is a slight delay between the appearance of the projectile and the beginning of its movement. Do you know how to get rid of the delay?
im having trouble understanding on 5:22, how did you come into conclusion that the amount of time the projectile will go from part 1 to part 2 is 1 second?
If you set a parts velocity to 0, 0, 6 then it will take 1 second for the part to move 6 studs on the Z axis if you set the velocity to 0, 0, 54 then it will take 1 second for the part to move 54 studs on the Z axis
Ok i got 1 more question at 8:44 we divide direction by 2, but how can we divide a X,Y,Z vector3 to a single number? does it give us a X,Y,Z result or only a single number result
its like doing local force = Vector3.new(direction.X / 2, direction.Y / 2, direction.Z / 2) if you look here: developer.roblox.com/en-us/api-reference/datatype/Vector3 you can see it says "Returns the Vector3 with each component divided by the number."
Bro! Thanks so much! I got and installed and wNice tutorialle watcNice tutorialng tNice tutorials I'm following your steps, and I really fully understand. So Kool! Thanks
I read somewhere that you should always set the parent of a new/cloned part at the very end (after setting any parameters). Is this true, or does the impulse/force & network owner need to be set after the parenting? I just LOVE your tutorials btw!
Hi I have a question, in the video how I learned to make Roblox games in a week, made by binzudev. He made a ball launcher similar to yours, but he had the balls go in random directions. Can you tell me how to make it JUST like his? Thanks. Timestamp 14:17 on his vid.
To those who didn't understand why he halved the gravity value to get the initial vertical velocity, here is an explanation : Consider the common link between x and y axis movement is time. Suppose to move the ball from point A to point B without gravity is T seconds, without gravity the ball will go straight. But in presence of Gravity we need to give the vertical velocity in such a way that it reaches back to the Point A vertical Position in T time also. Also the time taken by ball to reach the max height is same as time taken by ball to come down from the max height. Hence the final velocity will be zero. the initial upwards velocity can be calculated as : v = u - gt where v = final velocity, u = initial velocity, g = gravity, t = time, total time of flight is T, hence to reach max height it's T/2 and v = 0 at max height. final equation becomes u = gt, where u = gravity * T/2., (this equation is for Y axis) as in roblox the vertical axis is the Y axis.
If the server does the projectile then it will miss because the server is seeing the character in the past the player the projectile is going to hit will need to calculate the force
I was able to apply drag on my projectiles, but i wanted to get the required initial velocity to travel x distance on a θ angle, but its too much pain trying to get the derivations for velocity, because drag force, which is based on current velocity, changes acceleration, which changes velocity, which changes drag, and so on lol. I saw it can be approximated using some iterations but even that was too hard for me.
Thanks so much for actually explaining what you're doing, but I'd like a little bit more knowledge on these systems. What math would you recommend learning to better understand the physics in this game?
I personally have never learned math by trying to learn math what I would do in the past is keep reading the code over and over going over each step trying to follow the numbers as they go through the code and understand how each line of code changes the number to get the final value
I got a question about infinite terrain plugin. whenever i make a biome or a terrain when I test it in the studio test launcher it wont load the rest of the map it only loads the part of the map that I hovered over while editing in studio any guide would be appreciated. Although nice job with the plugin I really love it
This is fantastic! Although I do have a question, is it possible to add a distance limit? For example only allowing the projectile to shoot out 125 studs from its current position?
I love the channels that explain what every single line of code does. This is absolute perfection. Also I'm only a 7th grader so do you mind explaining to me how it's possible to subtract vector3s?
A vector3 stores 3 numbers for instance 1 vector3 has the values 2, 3, 4 and another vector3 has the values 5, 6, 2 if you subtract these 2 vector3s it's doing 2 - 5, 3 - 6, 4 - 2 and it will create a new vector3 with the values -3, -3, 2
I keep on getting this error message, and tried using all I knew about Lue to fix it but cannot find one. Position is not a valid member of Model "Projectile"
How did you make the bullet replicate for the client to see the projectile hits the character perfectly at the start? i set it so the bullet hits my character and it hits a little behind from my character position but on server it seems it directly hits my character just like at the start of the video? how do i fix this
I set the bullets network owner to the player who it's hitting then I sent a remote event to the player and the player sets the force in a localscript I will be having a video covering this problem in a future video
Absolutely incredible tutorial! I'm trying to implement an AI spear throw, but I'm having trouble figuring out a way to have to object move nose first along the trajectory it's thrown at. I've tried a few things with alignorientation that dont quite work, any insight on how I can do this?
@@5uphi So I'm trying to make a missile launcher (RAM). The launcher needs to point at the angle in which the projectile would launch at. Otherwise the missile would be pointing let's say 90* while the projectile launches at 45* and looks weird. I need I to point at it before launching.
@@5uphi How would I supply the align orientation constraints before firing the projectile to make the missile "holder" face the way the missile is going to be launched?
great video! but if i can ask (and maybe this is already mentioned but idk), why should the force of the y axis on the projectile half of the gravity? why cant it be other values?
If the part starts at a velocity of 0 and gravity is set to -10 after 1 second the part will have a velocity of -10 If I set the parts velocity to 5 after 0.5 seconds the part will have a velocity of 0 and after a total of 1 second will have a velocity of -5 So if it takes one second for the part to get to it's target we set its velocity to 50% of gravity
Great tutorial! I do want to know though how you could implement all this into a tool. I'm trying to make it so that whenever a player clicks somewhere, it'll spawn in the "From" part while "To" stays in the tool. Making it seem as though the player is shooting a projectile towards the spot. Thank you!
Is there a way to to get the projectile to only move once instead of over and over again? i also have the code in a remote event and the ball just goes off into space but it has no errors im confused
u really do show that u know what u are doing, no errors while explaining, no mistakes on the script, going straight to the point, great to teach new things (for example, i didnt have any idea about the "apply impulse", and now i always use it and the math log that i didnt had quite good idea about), u are one of the best programmers of roblox ever
Thank you.
Videos are pre scripted and recorded in small takes any takes with mistakes are scraped and re done until I'm happy with it
You're one of the best scripting channels I seen, most of the tutorials you upload are things that are so useful that I didn't even think about!(I was going to use bezier curves for my projectile😅) Your tutorials are very helpful to me and many others, Hope you're having a wonderful day!
Thank you, I had a very nice day today and I hope you also have a wonderful day
I was looking for this! I actually tried to program my own physics into Roblox -- however I had no idea I could completely override their physics engine. This is extremely useful, thank you.
Absolutely amazing breakdown and pacing, great job explaining everything and not over complicating it.
Wow, I'm surprised youtube recommended this to me. This is amazing! You explained a useful concept that can apply to many things in a extremely simple way, while showing examples and graphs. Amazing!
Your voice, your speed, your explanation. It's all perfect.
(˵◠‿◠˵)
Most underrated scripting channel I need, not too simple but not too complicated
exactly I dont know why other scripting channels seem to either be so simple and basic its not even useful and others are so complicated it feels like they dont even know what they are talking about and usually dont explain a thing not nearly as good as this guy, we need more scripting channels like him
I struggled so much
I was looking for a way to make a curving projectile for my game, this is perfect, its so easy to understand. Thanks man, keep it up!
this is actually a really good tutorial and i never knew learning high school physics can help me understand it more lmao
you came in CLUTCH with my player cannon system!!
thank you so much for your videos!!!💪
Thank you! This helped my grenade logic for my game!
I love your videos, you actually make tutorials about underrated scripting topics
This video came out of nowhere and solves the exact problem I was having, despite me spending ages searching for a solution. Great video!!
I’ve always needed this formula, thanks so much for figuring this out
Tysm, you actually helps people, thank you for existing!
this is the best roblox tutorial that I have EVER seen. It's really well thought out
2 Years later this tutorial is still very useful! Good job!
You're so helpful for people trying to go from intermediate to advanced scripters on Roblox, thank you
Thanks for the video suphi. This was was really awesome and has lots of fun and interactive applications.
Perfectly timed video! I couldn't think of something to make but I wanted to script, lol.
Mood 😩, I can never think of what to code
Appreciate this friend, this is super articulate and cool.
Wow. Really well explained. Deserves way more subs.
thank you i had seen the phicis funtins in documentation but i didnt know how they worked so o just came up with my own way but i want to improve and was looking for helpful videos thank you you explained it vey well definetly gonna rewatch a couple of times
Like 2 minutes in and you've solved the issues I was having. I didn't realize that box for showing what was going on was there, I didn't
I'm happy you managed to solve your problem in 2 minutes
Thank you so much, you explain really well, you're one of the reasons I like math
Awesome videro! I will be using this for my game :)
Just wanted to express how helpful your videos are!! you are extrely good at explaining tNice tutorialngs in-depth but still at a basic level for
Keep up the amazing work , Every video you make is always something unique an great!
Thank you very much!
Thank you for helping i honestly dont know that much math but you help me alot with these ecuations!
very well explained tutorial my friend. 💯👍
today i learnd a lot and bring it into a small game.
every video that you made is so interesting and helpful.
This was really intuitive!
So smooth! EverytNice tutorialng he says goes into my brain and sticks in.
this is aweeeesome. saved to my playlist 😊
Very interesting video! 👍
This helped me so much
Dude every video you make is amazing what the heck
Thank you
excellent job bro , greeting from colombia :D
Thanks bud! great video and instructions.
Very useful and good tutorial thank you!
I am getting back into production after so ti and tNice tutorials makes it so easy to understand. Thank you so much for making these videos.
No problem
i usually use bezier curves but this is amazing
Simply an amazing Turorial i understand everything you said Thank you so much
You can also change the arc by lowering the gravity multiplication and also multiplying the direction by what the gravity is divded by 0.5
I believe we cover that in the video already
@@5uphi oh whoops I didn’t see
Ay thanks for this useful video!
damn you can type fast. also your amazing at explaining the concept.
I just adore your videos
This is an awesome video, tysm
this makes it seem so simple!
If it is intriguing to you, you won't be forgetting it easily
This is so good!
fire video, thanks bro
Math is my worst skill 😅. Thanks for uploading this ive been lookin for something like this for a while
Great tutorial! I do have a question (if you'll even respond on a year old video), i want the projectile to curve upward instead of not curving much, would I have to use the first method of duration or is there a way to do it with the final method?
insane tutorial, thanks
Hi, thank you so much for the great tutorial! I have a question. I noticed that there is a slight delay between the appearance of the projectile and the beginning of its movement. Do you know how to get rid of the delay?
If you do it locally there won't be a delay as the information won't need to travel between your computer and Roblox servers
@@5uphi Thank you for the quick response and for the information!
Good Video!,
I hope you are good!
Thanks I'm doing well how are you doing?
@@5uphi Excellent, thank God, I really like your videos, I have learned a lot, many successes!
Amazing share
im having trouble understanding on 5:22, how did you come into conclusion that the amount of time the projectile will go from part 1 to part 2 is 1 second?
If you set a parts velocity to 0, 0, 6 then it will take 1 second for the part to move 6 studs on the Z axis if you set the velocity to 0, 0, 54 then it will take 1 second for the part to move 54 studs on the Z axis
@@5uphi oh i see thank you for replying you are a goated youtuber fr
it very well! Good Job!
how have I not watched your videos before
Thanks! I will apply this to my mortar system
local duration = math.log(1.001 + direction.Magnitude * 0.01)
why do you have to use the Magnitude property (why cant you only say direction instead?)
direction is a vector3 and magnitude is a number this number tells us the distance of the vector3
Ok i got 1 more question at 8:44 we divide direction by 2, but how can we divide a X,Y,Z vector3 to a single number?
does it give us a X,Y,Z result or only a single number result
its like doing local force = Vector3.new(direction.X / 2, direction.Y / 2, direction.Z / 2)
if you look here: developer.roblox.com/en-us/api-reference/datatype/Vector3 you can see it says "Returns the Vector3 with each component divided by the number."
ah, thank you. i understand it better now
Completed ur 500 likes mate
unironically felt my brain expand and my inability to do math slowly fade away
Haha same
Bro! Thanks so much! I got and installed and wNice tutorialle watcNice tutorialng tNice tutorials I'm following your steps, and I really fully understand. So Kool! Thanks
I read somewhere that you should always set the parent of a new/cloned part at the very end (after setting any parameters). Is this true, or does the impulse/force & network owner need to be set after the parenting?
I just LOVE your tutorials btw!
Yes it's better to set the parent at the end and yes some things only work after you have set the parent like impulse and setnetworkowner
I'm a rapper who can't really afford production so I want to learn to make my own soft. I just want to say that I appreciate your teacNice tutorialng
Hi I have a question, in the video how I learned to make Roblox games in a week, made by binzudev. He made a ball launcher similar to yours, but he had the balls go in random directions. Can you tell me how to make it JUST like his? Thanks. Timestamp 14:17 on his vid.
To those who didn't understand why he halved the gravity value to get the initial vertical velocity, here is an explanation :
Consider the common link between x and y axis movement is time.
Suppose to move the ball from point A to point B without gravity is T seconds, without gravity the ball will go straight.
But in presence of Gravity we need to give the vertical velocity in such a way that it reaches back to the Point A vertical Position in T time also.
Also the time taken by ball to reach the max height is same as time taken by ball to come down from the max height.
Hence the final velocity will be zero.
the initial upwards velocity can be calculated as :
v = u - gt
where v = final velocity, u = initial velocity, g = gravity, t = time, total time of flight is T, hence to reach max height it's T/2
and v = 0 at max height.
final equation becomes u = gt, where u = gravity * T/2., (this equation is for Y axis) as in roblox the vertical axis is the Y axis.
So in short part go up for 50% of the time then part go down for 50% of the time ;)
@@5uphi Indeed.
Bro, you're a great teacher and explainer! Thank you for tNice tutorials tutorial!
Love this
What is needed to get the projectile to hit a player in game?
If the server does the projectile then it will miss because the server is seeing the character in the past the player the projectile is going to hit will need to calculate the force
i wanted to make something like mugen's anger weapon
I was able to apply drag on my projectiles, but i wanted to get the required initial velocity to travel x distance on a θ angle, but its too much pain trying to get the derivations for velocity, because drag force, which is based on current velocity, changes acceleration, which changes velocity, which changes drag, and so on lol. I saw it can be approximated using some iterations but even that was too hard for me.
Thanks so much for actually explaining what you're doing, but I'd like a little bit more knowledge on these systems. What math would you recommend learning to better understand the physics in this game?
I personally have never learned math by trying to learn math what I would do in the past is keep reading the code over and over going over each step trying to follow the numbers as they go through the code and understand how each line of code changes the number to get the final value
@@5uphi I see, so would you just recommend watching enough tutorials until I have a good grasp of physics?
I personally never watched any videos to learn physics
I got a question about infinite terrain plugin. whenever i make a biome or a terrain when I test it in the studio test launcher it wont load the rest of the map it only loads the part of the map that I hovered over while editing in studio any guide would be appreciated. Although nice job with the plugin I really love it
First press the setup button then press the save button and put the terraindata into the data folder you can message me on discord for help
Tysm
I'll message u from my legerdemainlol 9571 account
This is fantastic! Although I do have a question, is it possible to add a distance limit? For example only allowing the projectile to shoot out 125 studs from its current position?
yes its possible if you message me in discord id be happy to help
@@5uphi Sure thing! My tag is wowland#0928
@@5uphi whats your discord id sir
Nice tutorial Michael,
thanks George
I love the channels that explain what every single line of code does. This is absolute perfection. Also I'm only a 7th grader so do you mind explaining to me how it's possible to subtract vector3s?
A vector3 stores 3 numbers for instance 1 vector3 has the values 2, 3, 4 and another vector3 has the values 5, 6, 2 if you subtract these 2 vector3s it's doing 2 - 5, 3 - 6, 4 - 2 and it will create a new vector3 with the values -3, -3, 2
AMAZIMG
I keep on getting this error message, and tried using all I knew about Lue to fix it but cannot find one.
Position is not a valid member of Model "Projectile"
Your trying to get the position of a model but models don't have positions
How did you make the bullet replicate for the client to see the projectile hits the character perfectly at the start? i set it so the bullet hits my character and it hits a little behind from my character position but on server it seems it directly hits my character just like at the start of the video? how do i fix this
I set the bullets network owner to the player who it's hitting then I sent a remote event to the player and the player sets the force in a localscript I will be having a video covering this problem in a future video
@@5uphi Yes please make a video about it please i subscribed!
very well explained tysm but i have a problem with when the targetposition is the mouse and i aim it in the sky it just shoots it at the sky
Thank you for taking the ti to do tNice tutorials i know I’m gonna enjoy figuring it out
I was surprised how understandable tNice tutorials tutorial is, thanks!
No problem
Wow that's easy, thanks brodi
How do I make it so the projectile aims at the player instead of a part like at the start of the video?
Absolutely incredible tutorial!
I'm trying to implement an AI spear throw, but I'm having trouble figuring out a way to have to object move nose first along the trajectory it's thrown at. I've tried a few things with alignorientation that dont quite work, any insight on how I can do this?
If you message me in discord I can try to help
@@5uphi Sure thing
bro thanks so much. dis video is tiless 3 years ltr n still great
No problem
This is so much help. However, how would u go about calculating the angle of the projectile after it is shot (before falling back down)
You can use cframe.lookat
@@5uphi So I'm trying to make a missile launcher (RAM). The launcher needs to point at the angle in which the projectile would launch at. Otherwise the missile would be pointing let's say 90* while the projectile launches at 45* and looks weird. I need I to point at it before launching.
I guess you would need to use align orientation constraint and keep updating the cframe so the missile always faces the direction its going in
@@5uphi How would I supply the align orientation constraints before firing the projectile to make the missile "holder" face the way the missile is going to be launched?
great video! but if i can ask (and maybe this is already mentioned but idk), why should the force of the y axis on the projectile half of the gravity? why cant it be other values?
If the part starts at a velocity of 0 and gravity is set to -10 after 1 second the part will have a velocity of -10
If I set the parts velocity to 5 after 0.5 seconds the part will have a velocity of 0 and after a total of 1 second will have a velocity of -5
So if it takes one second for the part to get to it's target we set its velocity to 50% of gravity
@@5uphi ah ok i get it now, thank you man! love your videos 👍
brilliant and simple
Great tutorial! I do want to know though how you could implement all this into a tool. I'm trying to make it so that whenever a player clicks somewhere, it'll spawn in the "From" part while "To" stays in the tool. Making it seem as though the player is shooting a projectile towards the spot. Thank you!
Hey i have a question. What if i want the projectile to land where my mouse aims?
i wanted to make a thing that falls out of the sky and absolutely gobsmacks a player, and this is precisely what i needed to make it happen.
hey ive been watching your channel for a while and wondering how to make the projectile explode if it hits the red ball
super dope... thanks
Is there a way to to get the projectile to only move once instead of over and over again? i also have the code in a remote event and the ball just goes off into space but it has no errors im confused
Up to you dawg, how good do you want it?
years! Let know your questions!
What's 1 + 1?