[NEW]How to make A Pet Simulator X Game on Roblox - Part 3 — Transcript
Full transcript
- 0:00hello everyone and welcome back to a new
- 0:02video on the how to make epistle lyrics
- 0:04for game series in this video I'm going
- 0:06to be showing you how to make the how to
- 0:09finish the attacking system so now we'll
- 0:11show the damage and it will also despawn
- 0:14the drop and after four seconds it will
- 0:18respawn it
- 0:19also if you guys want to support me and
- 0:21want to have access to all of my project
- 0:23files including the one you're watching
- 0:25right now that will all be available on
- 0:27my patreon in Nintendo 2. the link will
- 0:30be in the description with that being
- 0:31said let's start
- 0:33all right so what I'm gonna do is start
- 0:35working on the dimension system so when
- 0:37I enter our main client script and right
- 0:40here what we're gonna do is firstly get
- 0:42our damage variable which is right here
- 0:44and we're gonna put it right here
- 0:49and then
- 0:50when we do this when we change the
- 0:53Descent value
- 0:54what I'm gonna do is if player
- 0:58dot values
- 1:00dot send to dot value DOT health
- 1:04dot value is equal equal to zero then
- 1:08what we're going to do is we're going to
- 1:10create the function right here
- 1:13and I'm going to call it so local
- 1:15function and it's going to be called
- 1:17this Troy drop it's going to take a drop
- 1:22as an argument and in this function what
- 1:25we're going to do is task that weight
- 1:270.5
- 1:28and local old parent is equal to drop
- 1:32dot parent
- 1:34and drop the parent is equal to uh
- 1:38replicator storage actually what I'm
- 1:40going to do is I'm going to add a folder
- 1:42inside of replicated storage and I'm
- 1:43going to call it these pond so D spawned
- 1:47drops
- 1:49and so uh local
- 1:53g-spawn drops is equal to replicated
- 1:57storage going with the child despawn
- 1:58drops and so drops of parents is equal
- 2:01to replicator storage or uh is equal to
- 2:04g-spawn drops now we're gonna wait uh
- 2:07I'll respawn time so I want my part my
- 2:10drop to respawn every four seconds and
- 2:13after four seconds uh drop DOT health
- 2:16dot value
- 2:19is equal to drop dot Max health
- 2:23dot value and drop
- 2:26parent
- 2:28is equal to Old parent
- 2:30now what I'm going to do down here is
- 2:32we're going to call the destroy drop
- 2:34function
- 2:35and we're going to send the player.send
- 2:38to dot value
- 2:40and after that
- 2:42okay so I'm going to Fire error mode
- 2:44event before this and it's going to be
- 2:46cold okay so I'm going to add the remote
- 2:47event inside of this remotes folder and
- 2:51it's oh
- 2:53okay sorry remote event and we will call
- 2:56it
- 2:57stop damaging and what I'm going to do
- 2:59in here is remove stop damaging cone uh
- 3:02fire server
- 3:04okay so now I'm gonna enter my main
- 3:07server script
- 3:08and what I'm gonna do
- 3:11is okay so
- 3:13in here
- 3:16I'm going to put in
- 3:17remotes or game or where is it game the
- 3:22replica storage.remotes the remotes oh
- 3:25replica replicated storage but remotes
- 3:30[Music]
- 3:30um
- 3:31don't stop damaging dot on server event
- 3:34command connect function and that's
- 3:36going to take the player
- 3:38and when we fire this we're going to
- 3:40declare the uh values dot sent to the
- 3:45value
- 3:47is equal to nil
- 3:49and after that
- 3:52local player pets
- 3:54is equal to player oh okay so we already
- 3:57have available variable called flare
- 4:00pads
- 4:02so what I'm going to do is a little cold
- 4:04current
- 4:05layer of pets
- 4:07because you go to player pets square
- 4:10brackets player don't name and if
- 4:13hashtag current player best come and get
- 4:16children
- 4:19is greater than zero
- 4:22then
- 4:23uh local pet okay so local pet is equal
- 4:26to current player pets gonna find first
- 4:29child my first child okay so my first
- 4:33child of class
- 4:36model so when I get the first model
- 4:38which is the pet and Pat top attack not
- 4:42value is equal to false all right so now
- 4:45what I'm going to do is enter my main
- 4:47client script again so main client and
- 4:51down here what I'm gonna do is
- 4:55um around service okay so we don't have
- 4:57a reference for that so local run
- 5:00service is equal to game Conquest
- 5:02service run service
- 5:05and in here I'm going to do run service
- 5:07so hard okay so run service dot
- 5:10heartbeat.com connect function
- 5:13and for underscore comma drop and
- 5:17players drops
- 5:18okay so in pairs uh
- 5:21main where is it okay so do we have a
- 5:24reference to that
- 5:26now we don't workspace can wait for
- 5:28child's main folder on score workspace
- 5:32for child uh drops can get descendants
- 5:39do and what I'm gonna do is drop cone is
- 5:44a model then
- 5:47so if it is a model then local Health
- 5:50display is equal to drop coming with
- 5:53your child calling weight
- 5:56or find first child
- 5:59and let's see what we called it so I'm
- 6:01pretty sure it's called okay drops area
- 6:05one red drop Health display
- 6:10and local bar is equal to health display
- 6:12Health display uh dot background
- 6:16bar
- 6:19and local
- 6:21health
- 6:22display text
- 6:25is equal to help display
- 6:28background
- 6:31DOT health
- 6:33display text
- 6:37and
- 6:38actually it's called
- 6:40it's called Health display label sorry
- 6:42Health display label
- 6:45and after that help display
- 6:49text Dot text
- 6:52is equal to and drop DOT health
- 6:55the value
- 6:58and the bar contain
- 7:02size
- 7:05and I'm going to put in use them to Dot
- 7:08from scale
- 7:09uh jobs.health
- 7:12dot value
- 7:13divided by drop dot Max health
- 7:19value
- 7:21uh comma one
- 7:23and then in the easy style so again I'm
- 7:28not using Style
- 7:29dot actually is in direction is in
- 7:32Direction so out and in the easing style
- 7:35DOT sign then 0.3 for the 20 speeds now
- 7:41I'm going to play the game and see if
- 7:43this works
- 7:46okay
- 7:48so I'm going to show the output and I'm
- 7:50going okay so as you can see this
- 7:52does work but what I'm going to do is
- 7:54uh go to replicate the storage pets and
- 7:57I'm going to get a maybe a cat and I'm
- 8:01going to go here uh player pads players
- 8:03prank cat paste it in now I should get
- 8:06my cat and if I press this it should
- 8:09start damaging this and as you can see
- 8:12it does work now it might look like it's
- 8:14not twinning it but it actually don't
- 8:16it's actually 20 minutes so I can go
- 8:19ahead and set the uh damage value
- 8:24to a higher number so I can just go to
- 8:27my main client
- 8:28right here damage I'm going to put put
- 8:31it to 10.
- 8:33and this should be a lot quicker
- 8:36so I'm going to go ahead and get my pet
- 8:38again that's count
- 8:42erpets Polaris prog based into
- 8:46and I should go ahead and click this
- 8:49and as you can see now it does
- 8:52uh
- 8:53to Win It smoothly and if it gets to
- 8:56zero it should despawn it no it doesn't
- 9:00so Center is not a valid member oh
- 9:02that's very very simple to fix we just
- 9:05need to do player dot values
- 9:07not sent to the value
- 9:11and that should work now I'm also going
- 9:14to change the damage value to something
- 9:15a lot bigger like 20.
- 9:19and now if I give myself a pet
- 9:23then that should be
- 9:28that should work
- 9:30past flowers blog and
- 9:34click
- 9:36works okay now if it gets down to zero
- 9:39unable to assign property value
- 9:42object expected oh
- 9:47player.tag.value oh it should me it
- 9:49should be nil sorry
- 9:52let me double check okay so it should be
- 9:54nil
- 9:56now it should work
- 10:00cat copy it paste it inside of the
- 10:04Polaris proc folder
- 10:06now that I have a cat I can go ahead and
- 10:08click this and this time
- 10:11it should work
- 10:12and it does and it should respawn after
- 10:15four seconds
- 10:17and it doesn't
- 10:18okay
- 10:21job.max Health okay so I spelled Health
- 10:24wrong but now it should work
- 10:29I know I said that like
- 10:3110 times
- 10:33but I really hope it will work this time
- 10:40okay so click
- 10:45and let's see if this works
- 10:48these Pawns
- 10:50and
- 10:51a response and a full health great and I
- 10:55can switch between these and everything
- 10:57works fine no bugs alright so this is
- 11:01going to be it for today's tutorial this
- 11:03helped Please Subscribe click the video
- 11:04share it with your friends and I'll see
- 11:06you all in the next video bye
About this transcript
This page contains the full transcript of [NEW]How to make A Pet Simulator X Game on Roblox - Part 3 by polarisprog, generated from the public captions YouTube serves with the video. The transcript has 1,411 words across 246 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.