How to make a GAME like BLUE LOCK: RIVALS

00:21:49
https://www.youtube.com/watch?v=rM9ZZxSQ8dk

Resumen

TLDRThe video launches a new series aimed at viewers wanting to create their own game modeled after "BL Gravels," which has seen billions of visits. In this episode, the host explains the process of handling a ball object in the game, detailing how to make the ball using a sphere, set its properties, and implement scripting for player interactions. Key scripting concepts such as creating remote events, collision management, and welding the ball to the player are also introduced. The tutorial is beginner-friendly and emphasizes independence in game development.

Para llevar

  • 🎮 Learn the basics of game development with a focus on ball handling.
  • ⚙️ Create a ball object using a 3D sphere in your game.
  • 🔧 Understand how to set properties for game objects effectively.
  • 📜 Implement scripting for player interactions with the ball.
  • 🛠️ Use remote events to manage ball welding to players.
  • ⚖️ Adjust physical properties like elasticity and friction for realistic movement.
  • 🛡️ Manage collision groups to avoid player-ball collisions.
  • 👨‍💻 Script player proximity checks for ball pickup.
  • 🏗️ Begin developing a game concept based on popular models like BL Gravels.
  • 🔔 Stay tuned for the next episode focusing on shooting mechanics.

Cronología

  • 00:00:00 - 00:05:00

    In this opening segment, the speaker welcomes viewers to a new series focused on creating a game similar to 'BL gravels'. The episode will introduce the basics of ball handling, starting with how to create and manipulate a ball object in the game environment.

  • 00:05:00 - 00:10:00

    The speaker demonstrates how to create a ball object by importing a sphere and applying the necessary properties such as transparency and physics interactions. Instructions are provided to duplicate the ball and enhance it with features like highlights and a trail effect when moving, setting the stage for further developments.

  • 00:10:00 - 00:15:00

    Further elaboration on scripting is introduced, detailing the creation of collision groups to manage interactions between the player and the ball. This ensures the ball can collide with the environment but won't interact with the player directly, facilitating a smoother gameplay experience while maintaining logical physics in the game.

  • 00:15:00 - 00:21:49

    The speaker dives into the coding aspect, creating a script that manages the ball's interaction with the player. Functions are defined to check for player proximity and ownership of the ball, leading to practical applications of welding the ball to the player. The session wraps up with a preview of the next episode's focus on more advanced features like shooting and passing.

Ver más

Mapa mental

Vídeo de preguntas y respuestas

  • What is the main topic of the video?

    The video introduces a series on how to create a game similar to BL Gravels, focusing on handling a ball in the game.

  • What are the first steps in creating the ball?

    The first steps include searching the toolbox for a ball model or importing your own sphere and setting its properties such as transparency.

  • What scripting is involved in ball creation?

    The video involves scripting to create a remote event for welding the ball to the player, collision handling, and checking player proximity.

  • What properties should the ball have?

    Key properties include setting the ball's physical properties like elasticity and friction, making it non-collidable with the player, but collidable with the ground.

  • What is the goal of this series?

    The goal is to teach viewers how to create and script game objects independently.

Ver más resúmenes de vídeos

Obtén acceso instantáneo a resúmenes gratuitos de vídeos de YouTube gracias a la IA.
Subtítulos
en
Desplazamiento automático:
  • 00:00:00
    hello guys welcome back to a brand new
  • 00:00:02
    episode actually a brand new series
  • 00:00:05
    because today we will be going into a
  • 00:00:09
    new series about probably what you all
  • 00:00:12
    heard about and why you collect on this
  • 00:00:14
    video so BL gravels it's a very very
  • 00:00:18
    very big game speaking of like billions
  • 00:00:21
    of visits
  • 00:00:23
    and I'm guessing since you clicked on
  • 00:00:25
    this video you want to learn how you can
  • 00:00:27
    make such a game yourself
  • 00:00:31
    yes heard correctly all by yourself so
  • 00:00:34
    let's get right into it so in this
  • 00:00:35
    episode we will be going on the basics
  • 00:00:38
    of the ball
  • 00:00:39
    handling so the complete
  • 00:00:43
    Basics so what we want to do is first of
  • 00:00:47
    all we want to get a
  • 00:00:50
    ball
  • 00:00:52
    and yeah you can search in the tool box
  • 00:00:55
    it's up here you can just search for
  • 00:00:58
    ball but I got my own ball so let me
  • 00:01:01
    just import it right now and then let me
  • 00:01:04
    show you what I've got in
  • 00:01:07
    here
  • 00:01:10
    so I
  • 00:01:13
    got this ball here go in and paste it in
  • 00:01:18
    yeah this is my B see right now it's
  • 00:01:23
    invisible not transparent
  • 00:01:26
    anymore
  • 00:01:28
    actually wait
  • 00:01:30
    why is
  • 00:01:39
    it okay there we go okay
  • 00:01:44
    perfect so what I essentially got here
  • 00:01:47
    is just a sphere so when
  • 00:01:52
    iar see I just have a sphere so I can
  • 00:01:54
    show you how you can make this yourself
  • 00:01:57
    so what you want to do is you want to go
  • 00:01:59
    to parts make a
  • 00:02:01
    spe and then you
  • 00:02:03
    can use the size I have it's 1.87 on all
  • 00:02:09
    axis and what you want to do then is
  • 00:02:12
    just rename it to whatever you want I'm
  • 00:02:14
    just going to rename it to ball then we
  • 00:02:16
    are going to make it transparent we
  • 00:02:19
    going to duplicate the ball put it
  • 00:02:21
    inside the ball and then name this fake
  • 00:02:25
    ball and then we want to make it not
  • 00:02:27
    transparent and then we want to r a wels
  • 00:02:31
    and we want to set the wels enabled and
  • 00:02:33
    depart one to
  • 00:02:36
    ball original B then I have a highlights
  • 00:02:40
    in here in the noral
  • 00:02:43
    ball uh which is currently
  • 00:02:48
    disabled and I
  • 00:02:52
    think or is yeah it's disabled I
  • 00:02:58
    think yeah and then I got
  • 00:03:03
    a attachment and then another attachment
  • 00:03:06
    and the
  • 00:03:07
    trail so that when we move the ball
  • 00:03:09
    around you can see that we have this
  • 00:03:11
    nice
  • 00:03:12
    Trail
  • 00:03:14
    and yeah then
  • 00:03:17
    lastly we want
  • 00:03:19
    to get our decs you can get your own
  • 00:03:23
    decs just Place some ball in the tool
  • 00:03:25
    boox and just get them on
  • 00:03:27
    here and now
  • 00:03:31
    yeah we have to get the Highlights and
  • 00:03:34
    set the the to our fake ball and as you
  • 00:03:38
    can see now it works so for the wel that
  • 00:03:42
    was in here so for this w we need
  • 00:03:47
    to look at the position and everything
  • 00:03:50
    and now as you can see we can move this
  • 00:03:53
    around and yeah this pretty much
  • 00:03:58
    works and
  • 00:03:59
    [Music]
  • 00:04:01
    and I think there is something else we
  • 00:04:03
    need to
  • 00:04:05
    do but I don't
  • 00:04:15
    know okay so let me just
  • 00:04:18
    check so we have to change some
  • 00:04:21
    properties in order for our ball to
  • 00:04:23
    works on the W there is nothing we need
  • 00:04:26
    to change everything is correct we got
  • 00:04:28
    zero here everything is working as a
  • 00:04:31
    but we have to do the active we
  • 00:04:34
    have to toggle it
  • 00:04:35
    all
  • 00:04:39
    and yeah we have to to us off by going
  • 00:04:43
    into the fake ball and we have to get
  • 00:04:46
    some things set here I'm just going to
  • 00:04:49
    make this white since I don't want my
  • 00:04:52
    balls be gray so I'm just going to make
  • 00:04:54
    it completely white and then I'm going
  • 00:04:58
    to
  • 00:05:00
    yeah get off my canid con quaring can
  • 00:05:05
    touch
  • 00:05:07
    and yeah this is all looking good and
  • 00:05:12
    yeah this is
  • 00:05:14
    good and then in our main ball in our
  • 00:05:20
    complete normal ball we want to change
  • 00:05:22
    some of those properties so I'm also
  • 00:05:24
    going to make it white even though it's
  • 00:05:27
    invisible just just for or one I guess
  • 00:05:32
    and then we want to set anres off we
  • 00:05:34
    want to apply custom physical properties
  • 00:05:37
    and we also want to make the ball M and
  • 00:05:40
    then the physical properties we want to
  • 00:05:42
    set a few properties so 0.7 then the
  • 00:05:45
    elasticity want to set it to
  • 00:05:47
    0.8 then the elasticity weight we want
  • 00:05:50
    to set it to two and the friction and
  • 00:05:53
    friction weight can
  • 00:05:55
    stay and yeah this is pretty much
  • 00:05:58
    everything we got let me see if we got
  • 00:06:00
    to change anything for no we don't okay
  • 00:06:05
    so now when we click on this we actually
  • 00:06:07
    click on the
  • 00:06:08
    ball so we want to click make sure we
  • 00:06:11
    always click on the ball and we want to
  • 00:06:14
    make the fake ball locked so that when
  • 00:06:17
    we click on the ball see that we
  • 00:06:19
    automatically select the ball so we move
  • 00:06:22
    this around like
  • 00:06:26
    this and then we can delete our
  • 00:06:32
    and
  • 00:06:34
    yeah so
  • 00:06:37
    then what we want to do is we want
  • 00:06:42
    to yeah okay so then we want to start
  • 00:06:45
    scripting it actually so let's go into a
  • 00:06:48
    ball and create a script in here and
  • 00:06:51
    let's just call it
  • 00:06:55
    ball and in this script we don't have to
  • 00:06:59
    insert anything and now let's going
  • 00:07:03
    let's get going to script so the script
  • 00:07:05
    is not very
  • 00:07:07
    long but it still is very
  • 00:07:12
    very necessary
  • 00:07:15
    to so first of all we want to go to the
  • 00:07:18
    replicated storage and create a new
  • 00:07:19
    remote event and we want to call this
  • 00:07:22
    wel ball since this episode is going to
  • 00:07:26
    handle welding the ball to the player so
  • 00:07:29
    first of all we want to get the
  • 00:07:31
    replicate storage the players the Run
  • 00:07:33
    service and the physics service to get
  • 00:07:35
    started so I got a pluging for this that
  • 00:07:38
    you have to write all these Services up
  • 00:07:42
    here so it should look like
  • 00:07:45
    this let me Zoom a bit in so you should
  • 00:07:49
    have the replic stage the players the
  • 00:07:51
    Run service and the physics service set
  • 00:07:53
    up here and now we can start using those
  • 00:07:55
    features from those
  • 00:07:57
    services so first of all we have to get
  • 00:08:00
    the event we just created so let's go to
  • 00:08:03
    write local wel ball which is the name
  • 00:08:05
    of our REM events and the the name we
  • 00:08:08
    are going to use in the script and we
  • 00:08:10
    want to get it from replic Storage we
  • 00:08:12
    want to wait for the child where
  • 00:08:14
    fall then we want get our ball which is
  • 00:08:18
    script of parent so the script is inside
  • 00:08:21
    the ball so we get the script's parent
  • 00:08:23
    which is the
  • 00:08:24
    ball then we want to create a collision
  • 00:08:27
    group if you don't know what a Collision
  • 00:08:29
    group is it is basically what lets the
  • 00:08:33
    player collide with anything so as you
  • 00:08:36
    can see right now I can collide with the
  • 00:08:39
    ball and we don't want this to happen so
  • 00:08:42
    we don't want that we can yeah collide
  • 00:08:45
    with the ball we want to have it not
  • 00:08:49
    collide with us so effects what this is
  • 00:08:52
    just setting can collides to BS but if
  • 00:08:55
    we do this you will see that our ball is
  • 00:08:58
    nowhere to be found
  • 00:08:59
    because it also does not collide with
  • 00:09:02
    the ground and just falls right through
  • 00:09:04
    it if I go and run the simulation you
  • 00:09:06
    can see it just falls
  • 00:09:08
    down so we want to use Collision groups
  • 00:09:12
    to make the ball still collide with the
  • 00:09:14
    grounds but not collide with us as a
  • 00:09:17
    player so let's go ahead and
  • 00:09:21
    write two Collision group names so I'm
  • 00:09:25
    writing this in all Bol and we name this
  • 00:09:30
    the ball group we want to give it a a
  • 00:09:32
    name name it's ball then we want to get
  • 00:09:35
    the player
  • 00:09:38
    group and this we name to
  • 00:09:42
    player then we want to get the physics
  • 00:09:45
    service and what we want to do is we
  • 00:09:47
    want to register a collision group and
  • 00:09:51
    we want to register it by the name of
  • 00:09:53
    the ball group and then we want to
  • 00:09:55
    register another Collision
  • 00:09:57
    group body player
  • 00:10:01
    group then we want
  • 00:10:03
    to set the Collision group set
  • 00:10:08
    collidable and we want to set the ball
  • 00:10:10
    group and the player group to false so
  • 00:10:14
    the ball group cannot collide with the
  • 00:10:16
    player group then we want to set ball do
  • 00:10:21
    Collision group is equal to the ball
  • 00:10:27
    group then want to get a few a few
  • 00:10:31
    values so the local current
  • 00:10:35
    owner is nil this will be the player
  • 00:10:39
    that is currently holding the
  • 00:10:43
    bow and then we just create a
  • 00:10:47
    wel
  • 00:10:49
    so we want to get a
  • 00:10:51
    function which is called pass ball we
  • 00:10:55
    want to insert a
  • 00:10:56
    plane so this function should check
  • 00:10:59
    if the player we insert here has the
  • 00:11:03
    ball so we want to get the
  • 00:11:05
    attributes and the attribute is equal to
  • 00:11:11
    player get
  • 00:11:13
    attribute and we want to get the
  • 00:11:14
    attribute has
  • 00:11:17
    all and then we want to return
  • 00:11:20
    attribute is equal to
  • 00:11:23
    true so what this will return if the
  • 00:11:27
    attribute is equal true will return true
  • 00:11:30
    and if not it will return
  • 00:11:33
    false secondly we want to make a
  • 00:11:35
    function
  • 00:11:37
    called is near all and this function
  • 00:11:42
    will check if our player is near to the
  • 00:11:46
    ball so we can pick it up we want to get
  • 00:11:49
    the radius in here too so we want to get
  • 00:11:51
    the player's character we can make this
  • 00:11:54
    a bit easier by specifying that the
  • 00:11:56
    player is indeed a player so the
  • 00:11:58
    character is equal to the
  • 00:12:01
    player and this spell it here player
  • 00:12:04
    character make sure you spell it as
  • 00:12:06
    exactly as I do if not
  • 00:12:10
    character then return BS
  • 00:12:15
    and and the local root
  • 00:12:19
    part is equal to the character find
  • 00:12:22
    first child I'm want to find the
  • 00:12:25
    humanoids root part this is essentially
  • 00:12:28
    the root part of a player character so
  • 00:12:33
    this holds everything together then if
  • 00:12:37
    not root
  • 00:12:39
    part then return alt and and then what
  • 00:12:44
    you want to return is want to get the
  • 00:12:46
    root
  • 00:12:48
    part
  • 00:12:51
    position minus the ball do
  • 00:12:55
    position and we want to get the
  • 00:12:57
    magnitude of this
  • 00:12:59
    and see if it's smaller or equal to the
  • 00:13:05
    radius and that's essentially
  • 00:13:08
    it then we want to have another function
  • 00:13:12
    another function which is actually the
  • 00:13:14
    longest and the last function we need
  • 00:13:17
    today just called the local wel wall
  • 00:13:24
    function we also make this a function of
  • 00:13:26
    course so the we ball function
  • 00:13:29
    will just have the
  • 00:13:32
    player in the
  • 00:13:34
    bracket and we also specify that the
  • 00:13:37
    player is also a
  • 00:13:41
    player then if has ball
  • 00:13:45
    player then return end so if the player
  • 00:13:49
    already has the ball then we want to
  • 00:13:52
    return end secondly if not is near
  • 00:13:56
    ball player
  • 00:14:01
    ball and then the radius which is 12 for
  • 00:14:04
    me then we want also return end so if
  • 00:14:07
    the player is too far off we don't want
  • 00:14:10
    the player to be well the ball to if
  • 00:14:13
    current
  • 00:14:14
    owner and
  • 00:14:18
    players is
  • 00:14:20
    an let me
  • 00:14:22
    see this an start off turn
  • 00:14:26
    over then current
  • 00:14:29
    home set
  • 00:14:33
    attribute as
  • 00:14:36
    ball false so what this will
  • 00:14:40
    do is if the current
  • 00:14:44
    owner is an
  • 00:14:47
    ancestor of
  • 00:14:51
    players then we want
  • 00:14:54
    to set his attribute to false
  • 00:15:01
    and then we want to set the current
  • 00:15:05
    owner equal to the
  • 00:15:07
    player and set the
  • 00:15:11
    player pass ball
  • 00:15:15
    attribute to
  • 00:15:18
    true then we want to get the
  • 00:15:21
    character and also get the rot so we can
  • 00:15:23
    scroll up and get this from
  • 00:15:26
    here we have to modify the bits so we
  • 00:15:29
    don't want to return false and we just
  • 00:15:31
    want to return
  • 00:15:35
    end then the ball of
  • 00:15:40
    parents is equal to
  • 00:15:43
    par and the ball set network owner is
  • 00:15:47
    equal to a
  • 00:15:49
    player you want to set the ball to
  • 00:15:53
    mless and we want to set the
  • 00:15:56
    ball can touch equal to FAL also want to
  • 00:16:01
    set the B and CID equal to F
  • 00:16:04
    to then you want to get every
  • 00:16:10
    part in iers
  • 00:16:13
    character come get the
  • 00:16:17
    sentence and if the
  • 00:16:22
    part is
  • 00:16:24
    a base
  • 00:16:27
    part then we want to set the Collision
  • 00:16:30
    group so parts do Collision group is
  • 00:16:33
    equal to player
  • 00:16:39
    group then if
  • 00:16:45
    well then wel
  • 00:16:49
    destroy wel
  • 00:16:59
    well is equal to instance.
  • 00:17:02
    new motor
  • 00:17:07
    60 well. name is equal to ball
  • 00:17:15
    motor and then we want to get a few
  • 00:17:18
    properties so the part zero is going to
  • 00:17:21
    be equal to U part and the
  • 00:17:25
    wells part one is going to be equal to
  • 00:17:29
    the
  • 00:17:30
    ball then the well parent will be equal
  • 00:17:33
    to the
  • 00:17:34
    ball and the well. c0 is going to be
  • 00:17:38
    equal to cframe new we get 0 - 2 orus
  • 00:17:45
    2 Dem to print all welded to
  • 00:17:51
    player and then get the character of
  • 00:17:56
    name then what we want to do is W ball
  • 00:18:01
    on Ser events connect
  • 00:18:04
    function and then we want to connect
  • 00:18:06
    itching not function just well B
  • 00:18:10
    function just like
  • 00:18:12
    this now we also need the client for
  • 00:18:16
    this to work which is even
  • 00:18:19
    shorter so let's create a client and
  • 00:18:22
    let's do is so in the STA player and the
  • 00:18:24
    STA character Scripts
  • 00:18:29
    oh let's create in play scripts I think
  • 00:18:32
    let's call this ball
  • 00:18:35
    PL or just ball how you prefer
  • 00:18:40
    it then we have to get a few
  • 00:18:43
    Services before we can get
  • 00:18:48
    start mess up here okay so now you want
  • 00:18:52
    to get the player is equal to players.
  • 00:18:55
    local player you want to get the ball
  • 00:18:58
    which is equal to workspace with
  • 00:19:03
    all then we also get the
  • 00:19:21
    character like this Che get the root
  • 00:19:24
    part
  • 00:19:38
    then we want to get the
  • 00:19:41
    remote ball
  • 00:19:45
    event and then we want to set the local
  • 00:19:48
    well
  • 00:19:49
    distance equal to four and local
  • 00:19:56
    wels cool down equ to
  • 00:20:00
    FS local function W
  • 00:20:04
    call if W cool
  • 00:20:07
    down then
  • 00:20:11
    return local
  • 00:20:14
    distance is equal to B
  • 00:20:18
    position minus blot part
  • 00:20:22
    position do
  • 00:20:27
    magnitudes if this
  • 00:20:30
    is less or equal than the W
  • 00:20:33
    radius or the W
  • 00:20:37
    distance then well cool down
  • 00:20:41
    is remote
  • 00:20:43
    all fire
  • 00:20:46
    server and then to task the
  • 00:20:49
    weights cool down I'm just going to put
  • 00:20:52
    two here and set the world colon to
  • 00:20:55
    false
  • 00:20:56
    here then run service
  • 00:20:59
    heartbeat con connect
  • 00:21:02
    function World
  • 00:21:05
    ball and now we can try this out let's
  • 00:21:08
    place our ball a bit off and let's go
  • 00:21:13
    ahead and play the
  • 00:21:17
    game let's go up to our ball and you can
  • 00:21:20
    see that we now have welded the ball
  • 00:21:22
    onto our player we can move like normal
  • 00:21:26
    and everything works also see that the
  • 00:21:28
    ball was followed to my player in the
  • 00:21:31
    next episode we will be handling
  • 00:21:34
    shooting and maybe
  • 00:21:36
    passing so if you don't want to miss out
  • 00:21:38
    on this make sure to comment like And
  • 00:21:41
    subscribe to get more of my videos
  • 00:21:43
    recommended for you thank you for
  • 00:21:45
    watching my series and see you the next
  • 00:21:47
    time
Etiquetas
  • BL Gravels
  • game development
  • ball handling
  • scripting
  • roblox
  • collision detection
  • game mechanics
  • tutorial
  • independent creation