Mouse Raycasting - Tower Defense Tutorial #5

  Рет қаралды 214,192

GnomeCode

GnomeCode

Күн бұрын

This episode lays the groundwork ready for us to start working on our tower placement. In this episode we learn how to detect the position of the mouse, create a ray, detect what it hits and paint the town red!
DISCORD ► / discord
TWITTER ►@gnomecodeRBLX
TIMESTAMPS►
0:00 Intro
0:30 Detecting the mouse position
3:50 Getting mouse ray
6:00 Making raycasts
8:06 Using RunService
10:35 Interacting on click
14:30 Outro

Пікірлер: 664
@Pyr0Blox1
@Pyr0Blox1 2 жыл бұрын
Can we all agree that these tower defense stuff get better and better the more we watch them
@ekto3687
@ekto3687 2 жыл бұрын
@Cayden lee Cox yep probably
@yesimdre
@yesimdre 2 жыл бұрын
eye candy
@hetzo6718
@hetzo6718 2 жыл бұрын
Yessir
@TheLogster96
@TheLogster96 2 жыл бұрын
Ya
@mobileobbygod2589
@mobileobbygod2589 2 жыл бұрын
I do
@foolspark
@foolspark 2 жыл бұрын
I'm only a couple of episodes into this series and this is honestly amazing. I've seen so many roblox scripting tutorial youtubers try and do game development series like these, but never manage to execute it as well as you do. You go really into depth and explain thoroughly whenever you try to teach something, instead of just giving us the code, and telling us to copy it down.
@Norrday
@Norrday 2 жыл бұрын
FINALLY YES I'VE BEEN WAITING THANK YOU FOR MAKING THESE TUTORIALS SO MUCH!
@PineBloxx
@PineBloxx 2 жыл бұрын
Merry Christmas Gnome! Well done for this year and best of luck for the next!
@HoopsTheBee
@HoopsTheBee 2 жыл бұрын
Geez man! You really banging these out. Love it!
@morelakritssnovit4295
@morelakritssnovit4295 2 жыл бұрын
love ur vids
@robloxiansexclusive1781
@robloxiansexclusive1781 Жыл бұрын
didnt expect you here at all hoops, i love your channel!
@pissheater3k
@pissheater3k 3 ай бұрын
BEE SWARM MAN!?
@murganes3107
@murganes3107 2 жыл бұрын
Thank you gnome, your tutorials are sooo amazing!!! Please keep up the great work!
@TrollMonster24
@TrollMonster24 Жыл бұрын
Here's the script so you don't have to do it all and get stressed because you get an error! GameController: local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local camera = workspace.CurrentCamera local item = nil local function MouseRaycast() local mousePosition = UserInputService:GetMouseLocation() --print(mousePosition) local mouseRay = camera:ViewportPointToRay(mousePosition.X, mousePosition.Y) --print(mouseRay) local raycastResult = workspace:Raycast(mouseRay.Origin, mouseRay.Direction * 1000) --print(raycastResult) return raycastResult end UserInputService.InputBegan:Connect(function(input, processed) if processed then return end if input.UserInputType == Enum.UserInputType.MouseButton1 then if item:IsA("BasePart") then item.Color = Color3.new(1, 0, 0) end end end) RunService.RenderStepped:Connect(function() local result = MouseRaycast() if result and result.Instance then item = result.Instance end end)
@Ego_to_ID
@Ego_to_ID Жыл бұрын
god bless you
@TrollMonster24
@TrollMonster24 Жыл бұрын
@@Ego_to_ID You're welcome.
@ouren3220
@ouren3220 Жыл бұрын
TYSM it saved a lot of time i think
@bowmin1
@bowmin1 Жыл бұрын
I wouldn't just copy and paste this. I would advise trying to understand it and write it yourself. You aren't learning if you just paste it, and if you don't understand it you can't make updates and changes in the future.
@smelly6982
@smelly6982 Жыл бұрын
w rizz
@accid_ttv3699
@accid_ttv3699 2 жыл бұрын
Finaly another episode that i can spend 5 hours to do what he did in 15 minutes
@Dashing_Geometry
@Dashing_Geometry 2 жыл бұрын
true
@masondoesxd
@masondoesxd 2 жыл бұрын
what? it takes like 30 mins to follow his tutorials unlike any other ones that actually take 5 hours...
@wllow.
@wllow. 2 жыл бұрын
it takes me 14 minutes 👀
@pixelatedluis
@pixelatedluis 2 жыл бұрын
you’re complaining about that instead of commenting something like “your teaching me a lot, love the tutorials”
@universlion
@universlion 10 ай бұрын
8:48
@UltimanteTheCool
@UltimanteTheCool 2 жыл бұрын
I like how he doesnt just create tutorials and tell you how do do things... he teaches you as well and shows you common mistakes people do. thats awesome
@snowtotoy9177
@snowtotoy9177 Жыл бұрын
thats what tutorials are they teach you
@NeonLabsss
@NeonLabsss Жыл бұрын
yeah it's great I'm following the series to learn and test my scripting
@d00mprod
@d00mprod 2 ай бұрын
It's great when the SAME PERSON (Or should I say bot) COMMENTS THE SAME MESSAGE
@jamesclack882
@jamesclack882 2 жыл бұрын
Thank you this is an amazing tutorial this is the first GOOD one i have found in ages
@akiprox7
@akiprox7 Жыл бұрын
Tysm man! Best TD series ever!
@sliceggjd
@sliceggjd 2 жыл бұрын
This is just one word "AMAZING!"
@mrflovs754
@mrflovs754 2 жыл бұрын
the outro is the best thing i've seen all week
@BrenFirely
@BrenFirely 2 жыл бұрын
Finally someone do tower defense tutorial which I wanna learn from a long time😥 thank u!!!
@jigglyjosh5047
@jigglyjosh5047 2 жыл бұрын
with this in hand, we could use this to when we hover over an enemy it can display their health, as well as towers, we can see their level, range etc. This series is very helpful!
@LeoKhol
@LeoKhol 2 жыл бұрын
you can use mouse.Target tho
@wallop560
@wallop560 2 жыл бұрын
@@LeoKhol thats what i was saying LMAO
@inactive3772
@inactive3772 2 жыл бұрын
@@LeoKhol mouse is superseded
@pepperdayjackpac4521
@pepperdayjackpac4521 2 жыл бұрын
@@inactive3772 but it’s not deprecated
@inactive3772
@inactive3772 2 жыл бұрын
@@pepperdayjackpac4521 its recommended to use other methods
@BBTProductionsArchive
@BBTProductionsArchive 2 жыл бұрын
Amazing tutorials! With this new feature, I'm wondering if we could do stuff like level up towers, view range, etc. looking forward to seeing where this tutorial goes. :)
@clapanimates
@clapanimates 2 жыл бұрын
I’ve always wanted to make a td game ever since below natural made one and now I can because you are making this!
@reddeadleisure
@reddeadleisure 2 жыл бұрын
0
@Wazzalish
@Wazzalish 2 жыл бұрын
I love how you make tutorials from scratch instead of a “Kit”.
@Axium3
@Axium3 9 ай бұрын
oh my gosh you are right. ive tried to make a fighting game but every tutorial said to use so many scripts
@GamingCadeez
@GamingCadeez 3 ай бұрын
Wow! This is amazing!
@ICEDSummer
@ICEDSummer 2 жыл бұрын
YO LETS GO THANKS FOR THE TUTORIAL
@Dusty2763
@Dusty2763 2 жыл бұрын
the best tutorial KZbinr ever
@Pap3rf0ld
@Pap3rf0ld 8 ай бұрын
The Mouse Raycast Script is here: local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Camera = workspace.CurrentCamera local Item = nil local function MouseRaycast() --[ONLY ENABLE THE PRINT FUNCTION TO GET RESULTS OF MOUSE LOCATION]-- local MousePosition = UserInputService:GetMouseLocation() --print(mousePosition) local MouseRay =Camera:ViewportPointToRay(MousePosition.X, MousePosition.Y) --print(mouseRay) local RaycastResult = workspace:Raycast(MouseRay.Origin, MouseRay.Direction * 100) --print(raycastResult) return RaycastResult end UserInputService.InputBegan:Connect(function(input, processed) if processed then return end if input.UserInputType == Enum.UserInputType.MouseButton1 then if Item:IsA("Basepart") then Item.Color = Color3.new(255, 0, 0) end end end) RunService.RenderStepped:Connect(function() local result = MouseRaycast() if result and result.Instance then Item = result.Instance end end) If the part doesn't change color, change Basepart into Part and it should work. Hope I was of any help. :)
@MrCookie_official.
@MrCookie_official. 8 ай бұрын
what does the like on the print
@JohnGaming756
@JohnGaming756 6 ай бұрын
thanks bro i was struggling cus of an error which it said: "attempted to index nil with "GetMouseLocation""
@RobbyTheBall
@RobbyTheBall 5 ай бұрын
you dont need to change Basepart to Part you need to change Basepart to "BasePart" BasePart with an uppercased P
@Pap3rf0ld
@Pap3rf0ld 5 ай бұрын
@@RobbyTheBall The roblox studio concept changes in further updates so it might be different between other people
@sledgerfrost5181
@sledgerfrost5181 4 ай бұрын
we gotta make this top comment
@jhkz
@jhkz 2 жыл бұрын
That's so simple to understand, thank u bro ;)
@GnomeCode
@GnomeCode 2 жыл бұрын
Always great to hear, thank you!
@TopDuck521
@TopDuck521 9 ай бұрын
thank you gnome ur the best
@WearWQLF
@WearWQLF 2 жыл бұрын
I bet you at the end of this tutorial 75k subscribers good work gnomecode
@blockyee
@blockyee 2 жыл бұрын
This is amazing your so underrated
@jinxed-truly
@jinxed-truly 11 күн бұрын
thx for the tutorial i love this series!
@Jokubasas
@Jokubasas 11 күн бұрын
The code worked for you? Because mine doesnt
@jinxed-truly
@jinxed-truly 10 күн бұрын
@@Jokubasas it certainly does, did you double-check that your code is exactly the same as gnomecode's?
@Jokubasas
@Jokubasas 10 күн бұрын
@@jinxed-truly i did it a lot of times i even changed the BasePart into Part and none worked
@PeaKanin
@PeaKanin 2 жыл бұрын
i tried once... but failed. thanks for helping me see the light! you're the best!
@akiprox7
@akiprox7 Жыл бұрын
Amazing! Thank you!
@MrSpace5260
@MrSpace5260 2 жыл бұрын
i will probably never be abled to make a game like that but its fun to watch you make one ngl
@TheTomatoo
@TheTomatoo Жыл бұрын
Hello, GnomeCode! Can I use Player:GetMouse() instead of mouse raycasting ?
@dog_mco2701
@dog_mco2701 2 жыл бұрын
ik u upload next video fast but i want them faster i cant wait to complete my game thanks so much for helping me
@chrisk5397
@chrisk5397 Жыл бұрын
im making a case game where you can build with a hammer and needed to get something to help me out, this was the perfect video 10/10
@Dhfhdjhfjnd
@Dhfhdjhfjnd 2 жыл бұрын
I don’t understand very much of this but I still love watching it
@GnomeCode
@GnomeCode 2 жыл бұрын
Thanks for dropping by. I know some of the things shown here are a little advanced bit if you're looking to get into scripting I'd recommend Che king out my beginner series on making your first game
@sodiumchloride8886
@sodiumchloride8886 2 жыл бұрын
YESS PART 5!!!!!
@Dafusionplays
@Dafusionplays 2 жыл бұрын
When is episode 6 coming out? I’ve always wanted to make a tds game for years but here it is!! Thanks so much GnomeCode!!
@baconlol3716
@baconlol3716 2 жыл бұрын
maybe
@pixelatedluis
@pixelatedluis 2 жыл бұрын
2 days least probably 5 days max
@Zane-Satoru
@Zane-Satoru 2 жыл бұрын
bro it came out 3 hours ago dont rush
@BucketBloxxer
@BucketBloxxer 2 жыл бұрын
Im not even gonna use this. But im watching it for fun (: keep up the Good work Gnomecode!
@GnomeCode
@GnomeCode 2 жыл бұрын
Thanks, will do!
@Wazzalish
@Wazzalish 2 жыл бұрын
Will we get to make difficulty buttons before round 1 starts? Like Easy, Normal, Hard modes?
@aaronmclemore3368
@aaronmclemore3368 2 жыл бұрын
Hey gnome I have a question could u show a tutorial on how to make a map voting system and when the map gets the higher votes it teleports u to that map with a timer when the game is done and a intermission so u can be ready to select that map
@theblaze89miller
@theblaze89miller 2 жыл бұрын
love this, hope to see part 6, cant wait to brag to my friends i made a tower defense game from scratch
@reudu
@reudu 2 жыл бұрын
you should not brag it will come back to you
@Wertyhappy27
@Wertyhappy27 2 жыл бұрын
Following a tutorial isn't from scratch
@Crazy4Beyonce
@Crazy4Beyonce 2 жыл бұрын
Copy scripts isn’t from scratch
@GnomeCode
@GnomeCode 2 жыл бұрын
Best of luck with your game!
@theblaze89miller
@theblaze89miller 2 жыл бұрын
@@Wertyhappy27 what i mean is i didnt used that many free models
@ambarkegamer4528
@ambarkegamer4528 2 жыл бұрын
Ths is so cool I'm excited if you end of crate the map
@NikolasH123
@NikolasH123 Жыл бұрын
i thought you were making a tower defence not a paintball :D jk, really appritiate this tutorial, im not even making a towr defence, i watched this on random and it really helped me with my game, thnaks
@timelinxgames
@timelinxgames 2 жыл бұрын
Hey gnomecode. will you add different modes and a lobby and music that plays when the boss is there? Please reply ♥
@catdoor3676
@catdoor3676 2 жыл бұрын
Oh nice
@kplinger
@kplinger 2 жыл бұрын
based off of the beginning, you added a local script. does that mean that the game is gonna be solo/singleplayer? because you can only see the towers (by assumption, i havent continued the video)
@XedricPlays
@XedricPlays 2 жыл бұрын
yes thank you!
@gracetaylor7556
@gracetaylor7556 Жыл бұрын
thanks gnomecode!! someone in ur discord helped me btw
@skaiomg
@skaiomg 2 жыл бұрын
A bit late, but congrats on 3 years gnome! :D
@GnomeCode
@GnomeCode 2 жыл бұрын
Thank you!
@skaiomg
@skaiomg 2 жыл бұрын
@@GnomeCode No problem! I love your content!
@KielRussee
@KielRussee 2 жыл бұрын
You know you're doing everything right when you colored the whole map in the color
@EggVrGtag
@EggVrGtag 2 жыл бұрын
keep up the Good Work 1 thing tho soon can u teach us how to make units like jeeps and so that the dev can spawn enemys with admin cmds pls
@xevior1319
@xevior1319 2 жыл бұрын
Hey gnome, can you make a part 6 where you can get different towers? If you could, that would help alot, thanks!
@robloxplayz5014
@robloxplayz5014 2 жыл бұрын
Bro u gonna make me best tower defence simulator game
@kam7822
@kam7822 Жыл бұрын
I was having a ton of trouble with unions not changing colour and bam 14:08 he just solves it XD
@sebobebo10
@sebobebo10 2 жыл бұрын
This series is actually really helpful, I do have one question about line of sight. So basically, if there was a tower placed in the middle of the map and there was terrain between the tower and the enemy, the tower cannot shoot the enemy. So how would that be scripted
@GnomeCode
@GnomeCode 2 жыл бұрын
You could use raycasting for that if you wanted, though I don't think many games use line of sight for there towers. After all, it's more of an 'arcade' type game
@charlenebell7026
@charlenebell7026 8 ай бұрын
I don’t know how many parts he has anyway
@maxielius8544
@maxielius8544 2 жыл бұрын
Merry christmas everyone god bless us all
@neutralizedadd3990
@neutralizedadd3990 2 жыл бұрын
2:23 I learned that not putting a wait is a bad idea the hard way lol
@ProIsEpic
@ProIsEpic Жыл бұрын
jeez, must have did the poor gpu a burden
@Tiny_bigninja
@Tiny_bigninja 7 ай бұрын
@@ProIsEpicnah the script just ends now (luckily)
@Somftix
@Somftix 2 ай бұрын
Thanks 😊
@monke_744
@monke_744 2 жыл бұрын
my computer died from your great knowledge
@mrlollypopfan2mrlollypop880
@mrlollypopfan2mrlollypop880 2 жыл бұрын
NOICE vid
@hampster0853
@hampster0853 2 жыл бұрын
i WATCHED YOU OTHER VIDEO THERE AMAZING :OOOOOOOOOOOOOOOOOOOOOOOO
@theofficialjorden226
@theofficialjorden226 2 жыл бұрын
Will you do things like a shop, unlocking towers with levels, tower upgrades, and animations, certain places where towers can be placed, or enemies attacking towers and cool stuff like that, or some of the basic stuff like things from Bloons TD? Either way, it's helping people who don't know much about scripting create a tower defense game
@sournois90
@sournois90 2 жыл бұрын
That's the problem. IMO people who are new to scripting should start with much simpler projects in which don't make you just copy scripts, like 89% are doing. I wish every person in the comments would know that you won't learn or make a good game if you ALWAYS use other's stuff and pollute the comment section with "Hi WiLl yOu mAkE a flYIng rObOT That SHooTs Cars?? Btw I'M haVinG proBLEms with The ScRipT i litEraLLy juSt CopIeD fRom YOu!!!1 whIch meAns tHe TuToRIAl wON't WoRK and it'S YOuR faULt!!!!1 "
@lambarini
@lambarini 2 жыл бұрын
@@sournois90 true but at the same time no. I learned ALOT from tutorials and now I can code stuff but nothing crazy. The problem with people is that they just copy and don't look into it.
@sournois90
@sournois90 2 жыл бұрын
@@lambarini yes, that's what i meant. i was referring to people that always ask for others to make stuff for you, without even trying anything. i had a friend like this and thankfully i didn't make anything for him. i also learned from "how to make a game" tutorials but their comment sections are filled with people that think scripting is just copying from a tutorial, which almost always end up in them saying "tutorial doesn't work". sure copying some stuff is ok who doesn't do it but it's like you said, they don't look into it and have absolutely no idea what they're doing my biggest problem with doing gigantic projects is that i tried to make one when i didn't know anything and i almost gave up forever, and i don't really want that to happen to other people... it sucks
@Crazy4Beyonce
@Crazy4Beyonce 2 жыл бұрын
Are u trying make a TDS game without know how script? The idea of these videos are learn and make urself, not copy and waiting for the next episode lol
@theofficialjorden226
@theofficialjorden226 2 жыл бұрын
@@Crazy4Beyonce no, I know how to script and I'm not making a tower defense I'm making a platformer game
@janmorenob1615
@janmorenob1615 2 жыл бұрын
Gnome, please do this in episode 5: Make inventory system of towers Animations of tower (shooting, idle) ofc Saving system Lobby Special abilities of towers
@theblaze89miller
@theblaze89miller 2 жыл бұрын
this is episode 5
@Norrday
@Norrday 2 жыл бұрын
too much for one episode.
@beniciogames4953
@beniciogames4953 2 жыл бұрын
Its basically one of those per ep but its too soon for that
@lukiValent
@lukiValent 2 жыл бұрын
idle animations for towers is just add a random animate script that loops forever
@DaWaffleman
@DaWaffleman Жыл бұрын
This episode is episode 5...
@OAUTN
@OAUTN 2 жыл бұрын
One thing: To make a TD game like TDS, you need to get a lobby with elevators teleporting you to the main game, telling you which wave your on, intermission for placing towers, and spaced out enemies.
@tomfooIeryz
@tomfooIeryz 2 жыл бұрын
yeah duh almost every TD game has that
@SRTdowned
@SRTdowned 2 жыл бұрын
Wooo made it to #5
@zoop08_
@zoop08_ 2 жыл бұрын
May you do a reverse path tutorial for humvees or things that come from exit
@celix4741
@celix4741 2 жыл бұрын
YES
@Ryan_Tse
@Ryan_Tse 2 жыл бұрын
YAY
@Misteramen
@Misteramen 2 жыл бұрын
Additional towers and their repsective abilities and specialities (e.g AOE) should be a thing for the next episode(s)
@DaWaffleman
@DaWaffleman Жыл бұрын
Should I just disable first person, because it doesn't work in first person at least for me? But that was a really good video, good job!
@noob9215
@noob9215 2 жыл бұрын
How long do you think this series will be?
@alskopim
@alskopim 2 жыл бұрын
You literally showed me all the things i needed to know, that other youtubers barely could make a tutorial on!
@GnomeCode
@GnomeCode 2 жыл бұрын
You're welcome, best of luck with your project!
@alskopim
@alskopim 2 жыл бұрын
@@GnomeCode Thanks!
@triducal
@triducal 2 жыл бұрын
im assuming you will be able to place rhe tower anywhere in the ground and not in a grid-lock?
@drowsycosmic4854
@drowsycosmic4854 2 жыл бұрын
What's your philosophy behind naming your variables? Which variables do you name using PascalCase, camelCase, snake case, etc. Also keep up the great content always look forward to your next video!
@GnomeCode
@GnomeCode 2 жыл бұрын
Good question. I always name services in PascalCase using their full name, then generally use camelCase for all other variables
@mageninjaballer1449
@mageninjaballer1449 2 жыл бұрын
@@GnomeCode what the difference??????
@drowsycosmic4854
@drowsycosmic4854 2 жыл бұрын
@@GnomeCode Thank you so much
@entityofanimations3952
@entityofanimations3952 2 жыл бұрын
@@GnomeCode GnomeCode everything is working but the raycasting doesn't work for mobile does anyone know a way to make it work on mobile also?
@Norrday
@Norrday 2 жыл бұрын
@@entityofanimations3952 he said in the video it won't work on mobile.
@Gumbibull
@Gumbibull 2 жыл бұрын
just keeps getting betterawwerrwe
@hamunja
@hamunja 11 ай бұрын
hey GnomeCode! this video helped me alot but i cant seem to find a work around with a bug -.-" on realistic 1st person a headcam is inserted onto the player and made the subject but since its there on first person, the mouse ray detects only the headcam and not the otherparts
@fireplayz8268
@fireplayz8268 2 жыл бұрын
Hey question on episode #4 the mobs didnt walk anymore and u wil be able to see that on ur screen how did u fix these?
@dontpinme9321
@dontpinme9321 2 жыл бұрын
hey gnomecode, the OnPlayerAdded local script from last video isn't working for me (the animation script). I uploaded the animations myself and I own them. Whenever a mob is spawned, it gives an error " attempt to call a nil value"
@pixelatedluis
@pixelatedluis 2 жыл бұрын
yes i knew it came today this is gonna be great Oh also fun fact all episodes put together (so far) are 1 hour, 20 minutes, and 28 seconds long
@GnomeCode
@GnomeCode 2 жыл бұрын
Much better broken down into individual episodes!
@pixelatedluis
@pixelatedluis 2 жыл бұрын
@@GnomeCode yep
@Trohten2Roblox
@Trohten2Roblox 2 жыл бұрын
Nice but wait if actually we use world raycast to the last checkpoint to the before last checkpoint for see if zombie, if not then we world raycast again to the before last checkpoint and if not zombie we continue right to the start and if result then we check if it s an enemy and if yes then we found the 1 enemy Tada, sorry for the long text x)
@PFearr
@PFearr 2 жыл бұрын
Nice
@Kreanmid
@Kreanmid 2 ай бұрын
I know i am a little late but was wondering what was happening because in the last video at the output it had it going every second but in this video i saw a 30 second gap between the waves is there a way I can fix this?
@ghostbear1169
@ghostbear1169 2 жыл бұрын
You should make another video about advanced enemys. Like editing speed of enemys. Changing tower targets to strongest, closest, or first enemy.
@raginggshorts5094
@raginggshorts5094 2 жыл бұрын
Changing the speed of enemies is easy it’s in the humanoid properties
@silo9596
@silo9596 Жыл бұрын
@@raginggshorts5094 ikr
@trashrobloxkid
@trashrobloxkid Жыл бұрын
The GameController script is kind of working but also not. I can make my avatar red by clicking it but not the baseplate or anything else. It says (Players.Me.PlayerScripts.GameController:24: attempt to index nil with 'IsA'
@BrianBaniewicz
@BrianBaniewicz 10 ай бұрын
Try using a function
@clappingtoday7167
@clappingtoday7167 2 жыл бұрын
this is literally what I’ve been looking for
@imnotsureman1093
@imnotsureman1093 2 жыл бұрын
Gnome, I have a question Can you release the finished product after all of the tutorials as a game lol
@GnomeCode
@GnomeCode 2 жыл бұрын
Sure, I'll make it open source too
@Silver_Rice_Studios
@Silver_Rice_Studios 2 ай бұрын
How would I be able to use something similar to this to see if the players mouse is within a certain distance of a different players character that is on screen? I am trying to make an ability that you have to aim, but not super accurately.
@ItsFinaleee
@ItsFinaleee Жыл бұрын
you should get to 100K subs
@Funguyfights
@Funguyfights 23 күн бұрын
Done eith this video reminder
@huttle
@huttle 2 жыл бұрын
perfectly timed just finsished #4!!
@Diskopanzr
@Diskopanzr 2 жыл бұрын
For an episode could you show us how to make different enemies have different health values? + healthbar?
@kittykatgameree7590
@kittykatgameree7590 2 жыл бұрын
if you go to humanoid under your enemies you should be able to set health and maxhealth from there
@THE_HONORED_ONE350
@THE_HONORED_ONE350 2 жыл бұрын
Finnaly
@verybasicchannel
@verybasicchannel 2 жыл бұрын
on the first few parts of scripting, it only waited there for 3 secs (because task.wait was equal to 3) then gave me the location, i counted 3 again, and what popped up was nothing, so i had to put it under a while true do function. And when i put processed at line 18, it appeared undefined, explains the blue line under processed. SAME THING WITH INPUT.
@noobynate_4955
@noobynate_4955 Жыл бұрын
Is there a way to change their targetting to not be the closest? (ex: first instead)
@BlendaCat
@BlendaCat 2 жыл бұрын
Hey Gnome, I highly doubt you will see this comment, but the tower doesn't fly to my camera for me. Do you have any idea on how to fix that?
@iiRazix
@iiRazix 2 жыл бұрын
Can u do a matchmaking - lobby please and thanks for your tutorial !
@sleepingcat7278
@sleepingcat7278 2 жыл бұрын
Hey u will do a video of how to make towers that can spawn things from the end to the start like a car and damage the enemies
@Iz_han
@Iz_han 2 жыл бұрын
Basiclly i get noob enemie then i did remodel as my model for tower defense game.By the way, thank you so much because other are just outdated 😁
@arubi04
@arubi04 2 жыл бұрын
I love your videos about scripting a TDS game, this series are the best so far. I have one question about animations. Well, we are making TDS game with my friend together, I made animation script from previous series, and it actually worked, I can see animations. But my friend can't see animations. And also when I run the game with "Run", not "Play", animations don't work. So how to fix it?
@GnomeCode
@GnomeCode 2 жыл бұрын
You won't be able to see any animations with "Run" as our animations are controlled by a local script, which can only run from the client. When you're in run mode, this is running only on the server. As for your animations being visible in game. If it's a group game, you will need to upload the animations to the group and NOT your individual profile.
@arubi04
@arubi04 2 жыл бұрын
@@GnomeCode sorry for being dumbo, but can you tell me step by step how to do that? I would really appreciate that
@sukiyaki4623
@sukiyaki4623 2 жыл бұрын
nice
@policiamilitar9060
@policiamilitar9060 Жыл бұрын
You too can do: Players = game:GetService("Players") Mouse = Players.LocalPlayer:GetMouse() task.wait(3) print(Mouse.Hit.Position)
Tower Placement  - Tower Defense Tutorial #6
40:12
GnomeCode
Рет қаралды 354 М.
Can 6 DEVS Make a Tower Defense Game Without Communicating?
14:01
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 19 МЛН
Stupid Barry Find Mellstroy in Escape From Prison Challenge
00:29
Garri Creative
Рет қаралды 19 МЛН
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 9 МЛН
Creating Towers + Killing Mobs  - Tower Defense Tutorial #4
16:22
I Played Cursed TDS Games
4:41
propellars
Рет қаралды 557 М.
I Made Snake Game with just redstone!
14:31
mattbatwings
Рет қаралды 353 М.
Making a Game in Lua with No Experience
5:52
Goodgis
Рет қаралды 246 М.
The ONLY Raycasting Tutorial You'll EVER NEED
23:54
script_ing
Рет қаралды 11 М.
I Made a Roblox Game in 100 Hours...
11:26
reyn
Рет қаралды 276 М.
Evolving AIs - Predator vs Prey, who will win?
12:15
Pezzza's Work
Рет қаралды 2,8 МЛН
He said I Couldn't Make a 3D Game... So I Made One!
10:29
Dani
Рет қаралды 9 МЛН
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 19 МЛН