Lifting Simulator Game Tutorial | Ep.1 | Roblox Scripting Tutorials πŸ“œπŸ“œ

Lifting Simulator Game Tutorial | Ep.1 | Roblox Scripting Tutorials πŸ“œπŸ“œ


hey good steady on here it’s been a
while I my monetization got removed by Google well YouTube but thanks to alvinblox who helped me get it back and so making videos again now that whole
things over there wasn’t as far as I can tell any reason for you to be on that
beat for me to be demonetized but that’s not the point of this video so in this
video I’m gonna be talking to be creating a lifting game this will
actually be a two or three part series maybe in more than that and this episode
will be on creating the tall to the user lifts you’re animating the tool playing
animations and that should be pretty much it for this tutorial for this
episode I’ll talk about what the other episodes are later or I might not talk
about them too much you probably both seen them in they’ll be in a playlist so
if you don’t know what a lifting game is got stuff like weightlifting simulator
so exactly 1 2 3 and then there’s my friend Xuefei made quite a lot of
these as his main ones Dominus lifting simulator where you lift
a Dominus up and down I mean I I personally don’t really like playing
these games enough they’re not very fun but it to me but they seem very popular
and I don’t think anyone’s made a tutorial on how to make them yet and
they’re quite simple to make so let’s get right into it so we’re going to
create a tool to start with so all we need to do is insert into the starter
pack at all I mean call is whatever we want but for the sake of the tutorial
we’ll just call it object because this is whatever object we’re lifting on now
into this we won’t set apart and every tool can take one part called handle and
it will automatically be connected to the player’s hand so we also don’t
really want it to be too big so we’re gonna make this earth one stud squared
part okay so just quickly show what this does I mean I’m not gonna do everything
I had but just in case you’re under store what happens when you make a
handle so we’ve now got this whatever you’re doing you can just attach a mesh
to this part you can live wherever you want so
obviously when I click right now and I think is happening I can’t do anything
there’s no statistics here or anything like that I’m just gonna reduce this a
little bit ok so what we want to do first is we want to create a animation
so you need the animation plug-in from the roblox from roblox it’s very easy to
do so download it you just need to go to manage plugins find plugins and then you
just go to this search bar here once it loads and you want to search for
animation I remember the second videos but just search anyway what is it looks
animation if we can’t find it I’ll just goes the robots come okay so one here’s
the roblox account then it’s good so the robots can’t just make it short make
sure it’s the real plugin we’re gonna go to the oh you can go to the inventory
okay basically you want to download the animation plugin from roblox
he’s called animation editor I mean this isn’t made by rocks I don’t
know if it is it though this might be it it’s called animation editor I’ll put it
in the script description oh you can find it here I think not really sure
ghost anyway so we’re gonna create a animation so the first thing I want to
do is create a click on the rig builder and you want to create a rig oh geez
he’s a block Creek okay so once you’ve got the plugin what you don’t want to do
is click on animation editor I want to click and select your rig and
then you want to start making keyframes so we want our character here to be
lifting an object so I’ve set the key the time length to 1 second so it will
take 1 second per lift although I’m not sure one I’m just I’m
lifting in my own in real life I think we should make it two seconds so one
second to lift one second to put it back down again so always do is just me to go
to one second and then we make the character be in the position we want it
to be in so you can enable this is clinical die K which means that you get
these it basically predicts and keeps this up natural-looking movement with
the player so you can see as I rotate this torso the legs move with it as well
so it looks natural as a real human being would do it so should play this
back again it was okay so when the player lifts something they’re probably
gonna be looking at what they’re lifting it’s going to be in this hand here and
their arms gonna move up of course as they lift I’m not sure the hand would
move I don’t think really but as they live they probably gonna go out to cut
here they might race their legs like really this thing there we go
I mean you can make this however you want it to be it’s your it’s your
animation of course so you can see that when I try and bend the leg forward to
the ika stops me because a human wouldn’t be able to do that usually
alright so we’ll just put this there cuz it’s dangling at the side and now we’ve
got our keyframe here we’re gonna add another keyframe at the end and what
this keyframe is going to be is the player back straight again okay so if we now run this you can see
that we’ve just got the play going back to its original position but what this
will mean is that if the player is doing something before they click like they’re
walking or something then the animation they’re already running will tween into
this animation here this position so it means that because if we started off
with a set position the player would suddenly suddenly start the stance sunny
stand completely still it looks kind of unnatural so by leaving this one second
blank it means that whatever the player is doing before this one second starts
that position will be animated into the lifting animation so now we’re going to
export this and we’re going to press export out to file let’s ignore all
those animations I’ve got there and we’ll call it lifting animation okay and
then right here it gives us the actual asset ID although I don’t know if I
trust that it doesn’t know that that’s ready to me so yeah so we’re gonna press
the paste in Chrome or whatever web browser use web browser of choice copy
this ID here that’s the animation ID and we can just close this now because we’ve
already saved it if you want to you can save to file I’m not going to do that
because it’s just for a tutorial and we can sleep the dummy as well now let’s go
back to the tool and in the tool we’re going to create a local script so we
just go insert and find local script and we’ll call this lifting cool should
really be called something like client lifting cool because it’s a script on
the client side it’s a local script which means it’s like I applied cited so
let’s get the tool object so I’ll call it equals script parent because that’s
this object here and we want to detect when it’s equipped and the way you can
do that is we can assign a variable we can call it equipped and obviously at
the beginning it’s not going to be equipped but what we do is we say object
object so equipped that’s and connect function so it creates a
function so whenever the object is equipped we
get this function and we change the variable equipped to true and we do that
and right now every time it’s equipped it will turn the true but whenever it’s
on equipped it won’t turn to false so there’s nothing to compare against so we
need to say object or unequipped to connect function and then we assign
equipped to false like this so now we’ve got this done we can now say whether or
not when the player clicks they should lift something up they should play the
animation so to detect when someone clicks you want to get the players Mouse
and to do that we say we need to first find their player object so we say local
player equals game players dot local player and that’s the player who’s
running this script the players we taught the player who’s tall it is now
I’m gonna create another function write another variable which is the player’s
mouse so we just say player who’s always team player get Mouse that’s the
function and it gets us the players Mouse for later use which we will use
later on for for clicking click detection so now we’re gonna do not
we’re gonna do sorry is we’re gonna sign mouse click so we’re gonna take mouse
talk I actually can’t remember what the well the function is I don’t really
prepare for these tutorials I’m just making this on the spot if it is not
we’ve already sorry about that I’m just so very busy with making games and stuff
I’m trying to do this I’m trying to get all the as much as many videos as I can
in and planning videos takes a long time so Mouse bottom one down gives us if a
spot is fired when the person clicks their left Mouse so what we’re going to
do is we say if equipped then we could also put here if peeps equals equals
equals true and that would be the exact same thing but instead we just input if
equipped which is up here it says ecliptic was true and if equipped
so this is the same as just saying if equipped is true then we do something
here and what we’re gonna do here is run the lifting animation and we haven’t
defined a variable for that so let’s define that’s going to need to find a
variable for the lift animation so local lifting ID equals I’m gonna paste that
ID we’ve got from earlier from this page I don’t know where it is actually but
remember we copy that ID from the animation and the animation page and
we’re going to put our BX asset ID before it because it’s a roblox asset
and then we’re gonna paste the ID we got from earlier for that animation now
we’re gonna want to also create an animation object so we’re gonna say
local animation equals instant store new and this is creating a new instance
which is an animation and we want to parent this animation also known as we
don’t want to vary the animation want and change the ID of the animation to
the lifting ID we just created here this variable we just assigned here and this
is the animation will be playing every time the player clicks their mouse so
once we’ve done that we down here is where we as where is why we create the
loading of the animation so we say local lift and in the lifting animation is
player dot so plague got character got humanoid because we need the humanoid of
our local player to be able to run an animation load animation and we’re gonna
take our animation we got from earlier that we just created just up here and
this doesn’t do it by itself we also have to run the animation so we say lift
down in play so what they should do is every time we click it should play that
lifting animation let’s have a look so that’s one click and you can see that I
lift it up it’s not very obvious I’ll admit I could have made
that a bit more it kind of just looks like they’ve got an electric shock or
something so now we’ve created our animation that’s only a very small part
really of what we’re gonna want to do is this so it creates a tool which runs the
animation I think that might be all I was good all I was gonna do in this
tutorial wasn’t it this episode okay so there we go we’ve created our tool and
we’ve run an animation on it you can see that the animation works for the player
so tune in next time for the next installment of this series on how to
make a roblox lifting simulator and I’ll see you in the next one all right

20 thoughts on “Lifting Simulator Game Tutorial | Ep.1 | Roblox Scripting Tutorials πŸ“œπŸ“œ

  1. wow i've been searching for a tutorial on this and yours actually worked ! Thx alot man Edit: When i spamclick the animation looks weird anyway to set a cooldown on the animation?

  2. I have tried it but it didn't work for me. I'm not saying your information is false but I need a little bit more information. Who else is having trouble?

Leave a Reply

Your email address will not be published. Required fields are marked *