How to make The Forge in Roblox! [Part 1: Mining] (Roblox Studio Scripting Tutorial 2026)
FULL TRANSCRIPT
Yo, what's going on? Today's video I got
how to make the forge um Roblox. Uh this
is part one in the series and stuff
stuff like that. Sorry again guys for
the time in between videos. Got a wisdom
teeth for move a week or two ago. So had
to recover had to recover from that.
Couldn't really talk. But yeah, um happy
new year to everybody. So hope
everybody's having a great 2026 so far
as you guys already know or if you're
new around here. As long as you show the
series love and support and it continues
to receive love and support, I will
continue. keep series going. If not, I
would not continue the series. It's that
simple. But yeah, I've heard a lot about
the forge. People wanted me to make a
video on it. So, this is part one. Um,
seems a pretty cool game. Pretty chill
RPG and stuff like that. Simple
mechanics. So, yeah, let's go and get
straight into it. Okay, so for the first
video, I'm just going to cover basics.
Just making a mining system. So, a few
things I do already have pre-made. Um,
first things first, let's just let's
just make a rock. Let's start off very
simple, right? Let's make a rock. So,
what I'm going to do is I'm going to uh
go go up here to the top, click right
here. I'm going to click spear. We're
just going to make a very basic rock.
Okay. So, for anyone who's new here, I'm
just a scriptor, not a modeler, not a
builder, none of that. So, every all
demonstrations will be very simple, I
should say. So, we're just going to make
it black. Um material just, you know,
we're making a rock. So, make material
rock, right? Um
and then you want to make sure it's
anchored, right? And then you could just
go ahead and just name it rock. Right?
Then we're going to need to add three
things. We're going to need to insert
three things into it. So first we're
going to need a number value. This is
going to be the health. Right? So number
value, rename it to be health. Now I'm
pretty sure as you guys can tell um when
a player tries to mine said rock and
stuff, it's going to slowly chip away at
the health until it reaches zero. So you
can set this to whatever you want it to
be. I'm just going to set it to be uh
15, right? It's completely up to you
guys for whatever number you want it to
be. Then we're going to insert a bool
value, right? And then we're going to
set we're going to call this is minable.
And then make sure it is set to true,
right? Cuz I'm I'm guessing there will
probably be objects that are um maybe
that might have like a health that might
have like a health value that may not um
that may not be minable. So just make
sure it's set to true, bull value. And
then obviously if it's set to true, then
that means players can mine it. And then
for the last thing, we need a hit box,
right? So, let's insert a part into the
rock, right? And then we're just going
to design a little hitbox. So, you can
set this transparency to 0.5 for now,
right? Um, this is what's going to
detect when the player is making contact
with it. Um, now, keep in mind, it's not
going to be the player's pickaxe. It's
going to be the player's body. So, you
just want this to be So, you want this
to be around it, or well, the player's
hitbox, I should say. Not the player's
body, the hitbox. So, you just want it
to be kind of around it. So something
like so yeah something like that right
but it doesn't have to be exactly like
mine can be however you guys want it to
be and then what you guys can do is call
this object pit box right few important
properties disable can't collide make
sure it's anchored and then set
transparency to be one and then just
like that we are done with our rock
right then we're going to need a remote
event to communicate between the server
and the client so head on over to
replicated storage click the plus icon
insert a remote event rename this remote
event to be core event Right. Then from
there, um, let's go ahead and let's work
on our hot bar. As you guys know,
there's a custom hot bar where you can
equip like your axe, um, any weapons you
have, stuff like that. So, let's head on
over to starter GUI. Hit the plus icon.
Screen GUI. Um, rename this to be core
GUI. Disable reset on spawn. Then, what
you want to do is you want to insert a
frame. This is going to be our hot bar
frame, right? I'm going to drag this
down to the bottom middle. And then I'm
going to set the size to be like 500 by
100, something like that. Then just have
it in the middle. Right. Boom. Then I'm
going to insert a UI grid layout into
it. And then you guys can set this to
whatever you want it to be, but what I
chose to go with was 8, 0. And then for
the cell size, um, I went with 80 by 80.
So boom. Right. So then now it'll
automatically size and position
everything you um, insert into it. So
then hot bar frame. You can set this
background transparency to be one. Then
you can insert a text button. And then
we only need one for for the first part
of the series um first video. So I'll
rename this to be pickaxe
text button. Right? This should be for
our pickaxe so players can equip and
equip their pickaxe. Right.
Going to make the background color nice
black. Set the background transparency
to be like 0.5.
Um, and then from there
you can clear out the text.
And then, um, this is Well, you know
what? Just do it anyway. So, then we're
going to insert a UI corner, right?
Insert a UI corner into it, right? Then
from there, we're going to go ahead and
insert a text. Well, we're going to need
two, but for now, we'll just do this
one. We're going to insert a text label,
right? And then we could call this
number text label, right? So this just
going to be the number at the top. This
is going to be the first item in our um
what is this code again? Yeah, hot bar.
Um so we're just going to set the text
to be one. So scale text. Text color
will be white. Text stroke color will be
black. And text stroke transparency will
be set to zero. And then obviously we
just need this to be a lot smaller. So
let's try like 20 by 20. Yep. 20 by 20.
Just like that. And it's in the corner.
Perfect. Okay. Then we will set the
background transparency to be one. And
then boom. Yep. Perfect. And then now we
just need a name text level. So we will
um I'll just duplicate this. Control
plus. So select it. Control + D or just
home and then duplicate at the top left.
We'll drag this down to the bottom
middle. So align it at the middle. If I
can get it right. What is the
Okay. So we'll do that. And then you you
just want to re um we just rename this
to be name text label, right? And then
here you're going to put whatever the
default pickaxe is in your game. I'm
just going to call mine rusty axe, but
it's up to you guys. I'm going to call
mine rusty axe. And then I just need to
make this wider. So like 100.
And let's see. No, that's too wide.
80.
to go up a little bit
or no I think that's fine. Yeah. And
then something like that. Okay. All
right. And then we are done with the UI.
Okay. Perfect.
So from here um the next thing let's
head on over to server storage. As you
guys can see I have a rusty axe already.
Drag this over to workspace to show you
guys if it if it will let me.
What the?
Okay, there we go. All right, so as you
guys can see, we have an axe. Okay, so
it's guys, it's really not that it's
really not that hard. Just literally go
to the toolbox, search for an axe if you
don't have an axe model, and then just
turn it into a tool. It's not that it's
just not difficult. Or just search up a
an axe model or pickaxe model. It
doesn't really matter. All All you
literally have to do is just plus icon
tool, name it whatever. Make sure it has
a handle. This is the This is just
literally This is just a regular part.
That's all this is. This is just a
regular part. This is where the player's
hand is going to be. So, it has to be
named handle and it has to be has to
literally named handle and inside of the
the tool, right? And then the P and then
this part is just the actual model
itself. This is just like a 3D mesh. So,
yeah, it's very simple. Um once you have
that, again, make sure the names match.
See how see how the names match? So,
once you do that, you're going to head
on over to um server storage because
obviously we want to store all this
stuff properly, right? So inside of
server storage plus icon, insert a
folder. Rename this folder to be items.
Then insert a folder into that folder.
And then you can just name this folder
axis. And then you can put your rusty
axe in there. Whatever your starter or
default ax is in your game. So we'll
just have that there. Um,
and then I do have two sounds. Again, I
got them from the toolbox. Just search
axe sounds. One's hit, one's swing. So
one is when you, you know, just swing
the the pickaxe. Otherwise, when you
actually hit something, you literally
just go literally go to the toolbox, go
to sounds, search back ax, and then just
um click them and then just make sure
they're in they're inside of sound
service. That simple. Okay, so open up
starter player. Now, let's get to the
scripting. So, starter player scripts
plus icon local script. Rename the
script to be core script in parenthesis
put local. We'll be here for just a few
minutes. So, let's create a few
variables. First, we're going to create
a variable for the user input service.
We're going to say local UIS is equal to
game get service includation marks user
input service. Then we're going to
create a variable for our remote event.
So core event is equal to gamerelicated
storage way for child core events. Then
we're going to create a variable for our
local player. So say player is equal to
game.local
player. Then we're going to set up our
first function. So core event onclient
event connect function in parenthesis
put event type. So it'll be the specific
event. Then press enter. Then we'll say
if event type is equal to in quotation
marks disable backpack. Keep in mind we
have a custom um backpack hot bar or hot
bar whatever you want to call it. So we
don't need the default Roblox enabled.
So enter. Then we will simply then we'll
simply just say local starty. It's equal
to game.st starter GUI colon set core
GUI enables. Then you just say nm.coregy
core GUI type backpack, false, right?
And then on to our next function. So,
first we'll create a variable be a
boolean. So, axe equipped is equal to
false. This is what we'll use to check
if whether or not the axe is currently
equipped. So, that we know if the
player's um either trying to equip the
axe or they're trying to unequip the axe
when they press the one key. So we'll
say UIS to input began connect function
in parenthesis put input comma processed
enter and we'll say if input do user
input type is equal to nm user input
type keyboard and not process which
pretty much just means the player is not
typing in chat when they press the key
enter. Then you'll say if input keycode
is equal to nm.keycode this can be
whatever you want it to be. I'm just
going to set mine to one enter. Then
you'll say if axe equipped, which is
just the same as saying if axe equipped
is equal to true, which means the you
know players ax is currently equipped.
Enter. Then you're going to say core
events fire server inclution marks
unequip
unequip. Wait, unequipped. Yeah, no, I
spelled that right. Unequip axe, right?
And then axe equipped will be set to
false. And then we'll just do the vice
versa. else if not axe equipped then
core events fire server equip
axe right and then you'll say axe
equipped is equal to true and then boom
it's just that simple now we can move on
to the server script all right let me
just make sure everything okay we are
good okay so then heading over to server
script service one last thing that I
already have done is an animation again
I got this from the toolbox I get
literally everything from the toolbox
except for the script that's literally
just it but yeah So just search up uh
like pickaxe animations and stuff like
that and then just find you an animation
and then so you just simply click right
here animation. Click that rename it.
Throw your animation ID in there. You
can't use my animation ID. It literally
will not work. You have to your own
animation ID. So then um click the plus
icon server script service. Insert a
script and then just drag your animation
inside of the script. All right. So
we'll rename the script to be core
script and parenthesis put server.
Right? We will delete print hello world
and then we will create a couple
variables. First create a variable for
the sound service. We say local
ss is equal to game get service. Sound
service for our sound effects. Remember
down here. Then for our next variable we
will we will create a variable for our
remote event. Core event is equal to
game. Replicated storage for child core
event. Then we'll create a variable for
our items folder. So items folder is
equal to games server storage for child
items. Then we'll go ahead and set up
our function. So gameplayers player
added connect function in parenthesis
put pl which is just short for the
player who joined the game. Um and then
we're going to create two variables.
First in or inventory folder, right?
This is going to this is a folder that's
going to keep track of um the the so
first the ores the player currently has
as well as the names of or not the name
the amount of them but also the names as
well. So or inventory it's equal to
instance new it's going to be a folder
or inventory.name is equal to quotation
marks or inventory.
Then or inventory.parent is equal to
player. Then we're going to create a
variable called equipped ax. So we know
like what um axe the player currently
has equipped or
Yeah. Yeah. Cuz it's Yeah. It's called
axe. So pickaxe axe. We'll just we'll
just call it that. Yeah. So we'll just
say equipped axe is equal to instance
new. This should be a string value,
right? Equipped axe.name is equal to
equipped axe. And then equipped axe
value should be rusty.
Remember, you want your names to be
consistent. So, whatever you name this
is what it should be here. So, rusty
axe,
right? Then equipped axe.
Is equal to player,
right? And then [clears throat] you're
going to set up a function player. Added
connect function in parenthesis put
character enter. And then we're going to
disable the backpack. So, go every time.
Make sure it's fire client singular.
We're going to disable the backpack each
time. player, comma, disable backpack.
After that, we're going to create a
hitbox for the player so that they're
able to, you know, be able to uh mine
things in combat and as well as I I
don't know. I don't think you can fight
other players, but I know you can fight
NPCs. So, we're going to create a
hitbox. So,
hitbox equal to instance new incl.
And then you're going to say hitbox.name
is equal to incl.
You're going to say hitbox.ed anchored
is set to false.
Hitbox can collide is set to false.
Hitbox.mmassless
is equal to true.
Hitbox.transparency is equal to 1.
Hitbox size is equal to vector 3 new. In
parentheses, put five, 6, 2.5.
Hitbox color is equal to color 3 new.
I'm going to make mine red, but it's up
to you guys. one comma 0 comma 0. Right?
Just going to be for testing purposes.
And then you're going to say hitbox
pivot 2 character humanoid root part C
frame. Then you're going to um weld it.
So we need to create a weld weld
constraint. So weld constraint is equal
to instance new. Weld constraint. Welds
constraint.Aart
zero is equal to hitbox. And wells
constraint.part part one is equal to
character dot humanoid road part. So now
they're welded together. Then
hitbox.parent
is equal to hitbox. And then boom, we
are done with the first function.
Now on to the um equipment equip and
unequip ax as well as being able to mine
things with with set ax. So we're going
to say core events on server events
connect function in parentheses put pl
for the player then comma event type
enter create a variable for the player's
character. So character is equal to
player character right then you're going
to say if event type is equal to
quotation marks equip ax enter
then you're going to say you're going to
create a variable for set x assuming we
can find it of course. So we're going to
see item folders.axes
find first child player.quipped
axe dot value. So if we can find set ax.
So if axe then you will say axe is equal
to make sure you clone it right. And
then you'll set its parent to be
player's character.
Then we'll say axe.act or I'm dot
activated which means the player just
clicked while they had the tool
equipped. connect function close
parenthesis. Press enter. Right? We're
going to play the swing. We're going to
play the swing animation. So, we're
going to say going to create before
animation track. So, it's equal to
character.humoid.animator
load animation. In parenthesis, you're
going to say script.axwing animation
at play. Right? Then you're also going
to play the sound effects. So, SS.ax
swing play. Right? You don't have to
have sound effects if you don't want to,
by the way. Um,
and then we're going to do some ray
casting. So, first let's get our start
position. So, start position
is equal to characterhumanoid
root part.h hitbox.position.
Then we're going to get our direction
which is equal to character.humoid
root part.h hitbox C frame.
V vector. Right. Then we're going to set
up our raycast parameter. So we're going
to say raycast params is equal to
raycast params new close parenthesis
raycast params filter type is equal to
nom.cast filter type.exclude and then
raycast params dot filter descendants
instances equal to special brackets. And
then you're going to say character colon
get to descendants right
and then you're going to finally create
our array. So ray is equal to workspace
ray cast start position, direction. Very
important. You need to multiply this
times something because what what's
going to happen is the ray is not going
to make it that far unless you like
multiply the direction. So I'm going to
set this to be five. You guys can mess
around with this number. The greater the
number, the further the range out. For
example, if you set this to if you set
this to be like five, then that means a
player can mine it when they're like
standing, you know, pretty close to it.
They don't have to be right up on it,
but pretty close to it. If you set it to
like 30, then that means that player
will be able to mine it from like all
the way over here. So yeah, choose a
number that worked for you. Then comma
raycast prams ray. Then from there,
we're going to use an if statement.
We're going to say if ray and
ray.instance, which means it made
contact with an object and
ray.stance.name
is equal to object hitbox, right? And I
specifically named um I wanted the part
the hitbox for the rock the rock the or
whatever you want to call it to be named
object hitbox because I'm not I don't
know I don't know if in the game you can
hurt other players. I don't know if
that's how that works. So that's why I
just wanted specifically to just be able
to just mine for now
press plus I don't know if you could
even use a pickaxe as a weapon. I don't
know if that does damage to NPCs but
anyway. So then we're going to create a
variable for our object [snorts] is
equal to ray.instance.parent parent
because remember the hitbox is a child
of our object, right? So then from there
um
you're then going to use n you're going
to say if object find first child we
need to make sure you know is when it
has this value and that is set to true.
So object is minable value is set to
true. Enter. If it is then we'll play
the sound effect.
Axe hit. So we hit something,
play will take away from its health.
Object.alth value is less than equal to
five. You can set this to whatever you
want it to be. Completely up to you
guys. Then we'll say if object health
value is less than or equal to zero,
which means it needs to be destroyed.
Then we need to we need to see if the
player already um has one of the um one
or more of the um objects inside their
or inventory or inventory. So if
player.org
inventory
find first child object.name
enter. Then all we need to do is simply
just do this player.org inventory
regular brackets. And then you're just
simply going to say object.name go on
the outside do value plus equal one
because they now have um an extra one
now or another one. However, if it's
not, we need to create the value. So if
player do or inventory
find first child object.name enter
then we're now going to create that
value. So we're going to say or is equal
to instance new. This is going to be a
number value. Right? Did not mean to do
that. Going to be a number value. You're
going to say orname is equal to
object.name.
Or do value should be one.
And then or.parent should be player.org
or inventory.
And then after you're going to skip
this. You're going to skip this end.
Is that's after? Yeah, that's Yeah,
that's after. Then you're going to
destroy the object regardless of whether
or not uh whichever one it goes. You're
going to destroy the object. And then
all right. [snorts] Then after that,
you're going to skip five ends. So very
simple. One, two, three, four, five.
Then you're going to press enter. You're
going to say else if that's how you
spell that. Else if event type is equal
to in quotation marks
unequip axe enter. Then you're going to
again create a variable for the axe is
equal to this time it's character find
first child player.equipped axe. Got to
make sure they still have it value. If
it's found then axe will be destroyed.
Very simple. All right, guys. Let's go
ahead and test to make sure everything
works. As always, if you guys want
access to any one of my scripts or
models, just simply read the description
to figure out how to gain access to
that. That goes for this video or any of
my other ones. What is that box? Oh, I'm
stupid. My bad, guys. My bad. This is
supposed to be supposed to be worlds
constraint that parent.
I've never even seen that error before.
My bad. But yeah, so just read the
description to find figure out how to
get access to that. Okay, so if I press
one, as you can see, I can equip,
unequip, equip, unequip. I'm able to
equip the axe. If I left click
box is not a valid member. I don't have
a hit box.
It's not good.
I think I think I know what it is. Hold
on. Reset my character. We're going to
be here for about 10 minutes because Oh,
okay. Never mind. And then if I have it
I think I know what it is.
No, I don't know what it is. Huh. That's
so weird. Why don't I have a hit box?
Why am I missing a hitbox?
I am so stupid. I never parented the
hitbox. My bad, guys. My bad. That's on
me. Oh, I see what I was supposed to do.
Never mind. I see what I was supposed to
do. Okay. I was supposed to do. Yeah, I
see. I see now. Okay. Right here, you're
supposed to hitbox. E equals to
character.oid
root part. Then we'll get down parent.
There we go. There we go. My bad, guys.
I forgot to parent this stuff. That's
why. That's why I had hitbox because I
was supposed to do that first but then I
got confused. Okay. Now, if I hit play
and I spelled it wrong. Fantastic. Okay.
Okay guys, make sure you didn't spell it
wrong.
Speed uppercase R. Okay. Now, let's hope
for the best.
Okay. There we go. Okay. As you guys can
see,
well, and here as well, you hear the
sound effect. Now, if I go over here,
we'll look at the rock and notice the
health, right? Boom. And you can hear
the sound as well.
Boom. Boom. Destroyed. Right. Then if I
go over here, my ore inventory, you'll
see I have one rock. So yeah, guys, this
is part one to how to make the forge. If
the series does well, I'll continue with
more videos. As long as the series gets
love and support, I will continue with
more and more videos and stuff. Let me
know if any bugs you guys find, anything
else you want to see, even if it's not
related to the series and stuff. Again,
sorry for the delay of the videos. I had
my wisdom teeth from moved not too long
ago. Hope everybody's having a great
2026 so far, and I hope you guys enjoyed
the video. If you did, definitely leave
a like and subscribe and I'll see you
guys in the next video.
UNLOCK MORE
Sign up free to access premium features
INTERACTIVE VIEWER
Watch the video with synced subtitles, adjustable overlay, and full playback control.
AI SUMMARY
Get an instant AI-generated summary of the video content, key points, and takeaways.
TRANSLATE
Translate the transcript to 100+ languages with one click. Download in any format.
MIND MAP
Visualize the transcript as an interactive mind map. Understand structure at a glance.
CHAT WITH TRANSCRIPT
Ask questions about the video content. Get answers powered by AI directly from the transcript.
GET MORE FROM YOUR TRANSCRIPTS
Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.