Hey guys! I'm planning on uploading a lot more and I'm really excited for the future of this channel. Be sure to join the discord server to stay connected, meet other devs, and learn!: discord.gg/FKcSyRh
@chickenoodle3397
4 жыл бұрын
I'd love a tutorial on Mesh Deformation it'll be kind of complicated though.
@potatozef
4 жыл бұрын
I like ur vids
@TheDevKing
4 жыл бұрын
thanks :)
@leoskits5982
4 жыл бұрын
once the NPC has reached one part, how do I make him move to another part and then loop that so he keeps walking like that?
@alieppey9555
4 жыл бұрын
Can I make a game with u
@axmist7189
4 жыл бұрын
20:25 Have captions on lmao
@rufodeer5421
4 жыл бұрын
"stripping tutorial... im serious im gonna do some sex criminals"
@mytholis7416
4 жыл бұрын
lmao
@cooperknows5627
4 жыл бұрын
20:47 “laying it in my own baby”
@GGGLStudios
4 жыл бұрын
@@cooperknows5627 lol
@lerebox
4 жыл бұрын
and then it said after the s*x criminal it said sick scripting LOL
@MarkoBrainz
3 жыл бұрын
7:20 "It's gonna get stuck on the wall - cuz it has *no brain* " Poor NPC ;c
@aticcorp2015
3 жыл бұрын
Lol
@snoanashi1597
3 жыл бұрын
The funny thing is that he is calling HIMSELF a "no brain"
@ausbossmoved
2 жыл бұрын
@@snoanashi1597 lol
@SussyBakaIsHappy
Ай бұрын
WE MAKING BRAIN FOR NPCS WITH THIS ONE
@smoreblox3485
Ай бұрын
@@SussyBakaIsHappyunfunny asf reply
@orange6230
3 жыл бұрын
Hello, everyone! if you are too lazy to type the script, here is the fully written sc: local PathFindingService = game:GetService("PathfindingService") local human = script.Parent:WaitForChild("Humanoid") local torso = script.Parent:WaitForChild("Torso") local path = PathFindingService:CreatePath() path:ComputeAsync(torso.Position, game.Workspace.EndingPart.Position) local Waypoints = path:GetWaypoints() path.Blocked:Connect(function() end) for i, Waypoint in pairs(Waypoints) do local part = Instance.new("Part",workspace) part.Shape = "Ball" part.Material = "Neon" part.Size = Vector3.new(0.6, 0.6, 0.6) part.Position = Waypoint.Position + Vector3.new(0, 2, 0) part.Anchored = true part.CanCollide = false if Waypoint.Action == Enum.PathWaypointAction.Jump then human.Jump = true end human:MoveTo(Waypoint.Position) human.MoveToFinished:Wait() end human:MoveTo(game.Workspace.EndingPart.Position)
@i0super0
3 жыл бұрын
I used this and it just created neon ball parts. not moving the character or anything Edit: It was a different character type. now its fixed
@Blemov
3 жыл бұрын
YOU ARE A LIFE SAVER
@Blemov
3 жыл бұрын
YOU DESERVE A LIKE
@orangeshorts8487
2 жыл бұрын
i just saved myself later on wow
@capuclol
2 жыл бұрын
im lazy, thanks
@barkmemes
Жыл бұрын
do not go to 20:29 and turn on subtitles!! worst mistake of my life 😭
@Thewawacat_
Жыл бұрын
Uh oh
@splishymancity
4 жыл бұрын
2:25 We're going to use r15 cause it's pretty simple. *deletes r15 model*
@yipyiphooray339
3 жыл бұрын
guess not
@robuxgod926
3 жыл бұрын
I think he meant r6
@pavlova3310
2 жыл бұрын
@@robuxgod926 ye same
@zeraoreon
2 жыл бұрын
i noticed that too!
@WaW_Real
2 жыл бұрын
LoL yeah
@specificocean588
2 жыл бұрын
the reason it is "lagging" is because of the wait(2). towards the end the paths were shorter because the npc just had to jump over stuff, so it was taking less than 2 seconds to get to the next waypoint and it had to stop and wait for the 2 seconds to finish. Instead you should make it wait until the movetofinished is called
@flawlesscode8698
2 жыл бұрын
how lol
@ImJustNeon
2 жыл бұрын
just remove the number inside the wait()
@flawlesscode8698
2 жыл бұрын
@@ImJustNeon Yeah but think about the lag afterwards, because standart its 0,3s
@IcikiwirJava
Жыл бұрын
i think task.wait() is way better
@thecolorblue7427
11 ай бұрын
@@IcikiwirJava task.wait wouldn't work in this case, because what the wait function for the npc is specifically used to wait for until the npc hits the waypoint. That means that it could end up waiting for eternity if it never touches the waypoint, but if it does touch the waypoint, it will stop waiting, and the loop will continue to the next waypoint. Task.wait on the other hand, just waits a set amount of time, whether the npc hits the waypoint or not.
@shishiirpriyadarshi9
5 ай бұрын
Hey @TheDevKing, I really appreciate your scripting tutorials from the past (lol). Before I watched your scripting tutorial for pathfinding, I would be confused because I was quite a new scripter back then. After watching your video, understanding it, and practicing it, I can now make a randomizer for this specific service! Thanks a lot! Hope you make more tutorials like this!
@IDcLuc
Жыл бұрын
i love how when he doesnt know what to say about something he just acts like he never talked about it and just says "you know what i mean anyways"
@okeanskiy
4 жыл бұрын
good video!
@TheDevKing
4 жыл бұрын
omg, okeanskiy. I've seen your videos man! Thanks a lot. Keep up the great work as well! :)
@eleos5
4 жыл бұрын
Its almost as if you made it...
@nhanif362
4 жыл бұрын
@@TheDevKingHello
@waterhd1834
3 жыл бұрын
@@TheDevKing really said omg and hes verified lol (no hate)
@SnortingPig88
Жыл бұрын
For all of you confused , 1) You have to type local torso = script.Parent:WaitForChild("UpperTorso") for r15 2) if your rig is still not moving, make sure the humanoid root part isn't anchored
@ReallyPieThings
Жыл бұрын
Thank you
@Woqdi
Жыл бұрын
Thank you so much for help!
@GalaxinTM
Жыл бұрын
alternatively set the torso variable to humanoidrootpart
@SnortingPig88
Жыл бұрын
@@GalaxinTM you could, but for the script in the video i suggest following what i said
@chickenoodle3397
4 жыл бұрын
Perfect i needed this for fire flies thank you so much perfect timing coming in clutch every time
@TheDevKing
4 жыл бұрын
Awesome good luck with the flier flies lol
@chickenoodle3397
4 жыл бұрын
@@TheDevKing it's really hard and i have the script and everything right and its not working i think ima restart lol i'ma keep working on my scripting
@chickenoodle3397
4 жыл бұрын
@@TheSxrged absolute lad
@dobi2447
3 жыл бұрын
any1 who thinks hes a mind reading lizard? Anyone?
@acurrz4367
3 жыл бұрын
@@chickenoodle3397 you making a one piece game?
@OfficialDevku
3 ай бұрын
Thank you! I've been learning lua because I wanted to step up from scratch and this is perfect for my monster in my horror game!
@bowling3414
3 ай бұрын
If you use R15, this won't work exactly the same, use an R6 model because it has "Torso" and not "Upper" or "Lower Torso." I haven't gotten the r15 to work but I assume you can target both upper and lower torso at the same time to be able to move it. Or perhaps it's humanoidrootpart, but I haven't figured it out.
@destiny4534
4 жыл бұрын
20:30 this is the story of sent_cons
@milkyway-uq1wg
4 жыл бұрын
Lol
@evansenju5986
4 жыл бұрын
oop
@JohnMkrv
4 жыл бұрын
open the captions
@mikethegamedev
3 жыл бұрын
Lfmao
@neosstuff
3 жыл бұрын
XDDDDDDD
@nicksloan9323
3 жыл бұрын
script for lazy people like me: local PathfindingService = game:GetService("PathfindingService") local human = script.Parent:WaitForChild("Humanoid") local torso = script.Parent:WaitForChild("Torso") local path = PathfindingService:CreatePath() path:ComputeAsync(torso.Position, game.Workspace.endingpart.Position) local waypoints = path:GetWaypoints() for i, waypoint in pairs (waypoints) do if waypoint.Action == Enum.PathWaypointAction.Jump then human:ChangeState(Enum.HumanoidStateType.Jumping) end human:MoveTo(waypoint.Position) human.MoveToFinished:Wait(2) end Your welcome
@BiBiSea
3 жыл бұрын
thanks
@nicksloan9323
3 жыл бұрын
@betagam4523p any way to make it control a car to go to a location then? ive been trying to find how to do it without neural networks, but ive had no luck. i kinda need help with this, thanks. What im trying to do is to make an ai police car basically, like in need for speed rivals, that are suprisingly blood thirsty to destroy your car
@ikeahedgehog
3 жыл бұрын
Thanks a lot, i was very lazy to do this thing.
@menofscoobistherepublic7660
3 жыл бұрын
thanks bro
@crimssoon
3 жыл бұрын
@betagam4523p I'm working on a taxi whit the script. Thank you so much!
@Food4Cats
8 ай бұрын
If you want to have the path constantly update and overcome newly placed obstacles which weren't calculated by the previous path, recalculate the path in a while loop until the character reaches the finish position!
@CoiledGravity
6 ай бұрын
how does one do this? ive been trying to do it
@dinoguy8052
3 ай бұрын
how does one do this? ive been trying to do it
@top-nerdygamer
4 жыл бұрын
I just turned my local stop sign into a humanoid and its chasing me, help me
@soronorjspro3516
4 жыл бұрын
Amazing! You are genius!
@NeoplayzGames
4 жыл бұрын
Wow u good
@permafrost8894
4 жыл бұрын
xDDD
@littletimmy9902
4 жыл бұрын
why
@MarioMario-yb3iz
4 жыл бұрын
@@littletimmy9902 y not
@Nathanator
4 жыл бұрын
Thanks for the amazing tutorial! I’m using it for a game similar to Work at a Pizza Place. I needed pathfinding so I could spawn NPCs at random locations. They needed to walk to the cashier to take their orders lol.
@TheDevKing
4 жыл бұрын
nice :D
@Nathanator
4 жыл бұрын
Thanks :D
@YorktownClass
2 жыл бұрын
@@Nathanator how's the game going?
@Nathanator
2 жыл бұрын
@@YorktownClass I ended up quitting Roblox development due to being busy with school and other things, I'm working on becoming an app developer instead now.
@YorktownClass
2 жыл бұрын
@@NathanatorWell i wish u good luck on achieving that! but can you tell me what's the *real* reason you stopped? (i'm making a game and if you can give me a headsup can really do me favor) btw i bet you forgot about this comment looll
@ItsHunderr
4 ай бұрын
at the very end, you can use task.wait(2s) and then part:Destroy(), so that way it won't make too much parts on ur workspace
@justarandom1947
3 жыл бұрын
20:00 instant karma XD
@ayanokouji5784
3 жыл бұрын
xD
@Felipowvisky
2 жыл бұрын
i finally made an working spins system after 1 week of tutorials on google and youtube, I wouldn't be able to make this if it wasn't for alot of people including you so... THANKS ALOT mostly you xD
@DryxilThaGod
2 ай бұрын
Congrats man. It's been 2 years. How's your progress
@themanpro9075
2 жыл бұрын
If you want the npc to go to one point then to another all you have to do is after finishing the script go down 1 and write wait(1) then copy and paste the first part under the wait(1) and change ending part to the name of the other part
@AlternativeEsportsYT
Жыл бұрын
Thanks you're a life saver! :D
@liamrileyborres
Жыл бұрын
could u explain a bit further? like what parts exactly do I change and keep and paste. Thanks
@liamrileyborres
Жыл бұрын
nvm I managed to do it on my own, I just did this after the main script: wait() human.MoveToFinished:Wait() human:MoveTo(game.Workspace.Goal2.Position)
@liamrileyborres
Жыл бұрын
if anyone wants me to paste my whole script then just ask (I didnt add the zombie stuff)
@RYAN-6000
11 ай бұрын
@@liamrileyborreshi can you paste it even though it's been a month
@paifu.
6 күн бұрын
4:05 Humanoid isn't a part and has no position 12:10 Every waypoint has actions (Walking or jumping) 15:50 Blocked event. In case the map changes or the AI gets stuck. 17:35 May need to use raycasting for pathfinding aswell
@maxbuilder6801
4 жыл бұрын
You know, this would make a great game idea, you have to get the bot or AI to the finish line, and you have to help it get there.
@soronorjspro3516
4 жыл бұрын
This concept has been used, it is really cool. Good thinking.
@migriv4603
4 жыл бұрын
Make it!
@CTahmid
4 жыл бұрын
soronorjspro show us
@maxbuilder6801
3 жыл бұрын
@@migriv4603 Perhaps I will make it... perhaps.
@pavlova3310
2 жыл бұрын
@@maxbuilder6801 yes make it best idea ever! I'm gonna make it but not publish
@vkrpn
Жыл бұрын
If you are doing it with an R15 character, replace the torso with the "HumanoidRootPart"
@kennethha8173
2 жыл бұрын
when you do this on a r15 rig, make sure that you have the HumanoidRootPart unanchored otherwise the character won't move.
@jasonanderson6842
2 жыл бұрын
Thanks bro
@andrejboricic6285
Ай бұрын
i love u
@LukeGabriel
4 жыл бұрын
Messaging Service noww hehe, trying to make a global matchmaking system hehe so would definitely appreciate a helpful video 😀
@TheDevKing
4 жыл бұрын
Coming soon :)
@LukeGabriel
4 жыл бұрын
@@TheDevKing 🙏🙏🙏
@LArk25
4 жыл бұрын
alvinblox made a video on messaging service - kzitem.info/news/bejne/1n9ss32QbItojY4 alvinblox is also a good roblox scripting youtuber
@DanielP533Scripts
4 жыл бұрын
@@LArk25 for beginners. this is the advanced series
@ultra3806
4 жыл бұрын
@@DanielP533Scripts that tutorial is still helpful...
@fxnlxn
2 жыл бұрын
Fun thing to do: Make lots of them with the pathfinding script. Put the endingpart inside the region3 from the tutorial a bit back. Where when found inside they die :)
@skeptical_playz6142
2 жыл бұрын
Awesome!
@calebaraujo8187
4 жыл бұрын
Can you make a tutorial on a autopilot car where you can select the location where it’s gonna go and turn it of if you want?
@okidokie8
4 жыл бұрын
Isnt this video showing how?
@FiredDanST
4 жыл бұрын
Yooooo. I needed this. Tysm
@TheDevKing
4 жыл бұрын
:)
@AlguienPromedio
4 жыл бұрын
Why not works in my world? :(
@akshitagoel6762
3 жыл бұрын
@@AlguienPromedio For me it said "Infinite yield possible" in the line where i defined the torso. That's because in the later version there is no part called a torso there is either upper torso or lower torso. Hope I helped.
@mizellland
Ай бұрын
I saw some people mention this, but you don't want to use torso when referring to the roblox character's torso. This will cause a discrepancy between R6 and R15 avatars because R15 uses UpperTorso and LowerTorso. Instead, use HumanoidRootPart. It doesn't matter if the character is R15, R6, RTHRO, even R34 (that one isn't real also don't look it up), HumanoidRootPart will always be in the same place. What is HumanoidRootPart? HumanoidRootPart is an invisible part in the roblox avatar located where the torso would be. It was made to fix the conflict between R15 and R6 avatars. It is also the primary part of the player model, so if you want to move the player, move the HumanoidRootPart. TL;DR: Don't use Player.Torso, because there is no "Torso" part in R15 characters. Instead use "HumanoidRootPart". It's located in the same place as the torso.
@east2381
28 күн бұрын
this tip only applies to games that have both r6 and r15 in coexistence
@mizellland
28 күн бұрын
@@east2381 yeah, but if you did have r6 and r15 in coexistence, then this would be a good tip. He also went over this in a later video.
@vkrpn
Жыл бұрын
Roblox did some updates, and I fixed the script, because in the new version the AI will infinitely double-jump. (This is for R15) local pathfinding = game:GetService("PathfindingService") local hum=script.Parent:WaitForChild("Humanoid") local rootPart=script.Parent.HumanoidRootPart local path=pathfinding:CreatePath() path:ComputeAsync(rootPart.Position,game.Workspace.Target.Position) local waypoints=path:GetWaypoints() for i, waypoint in pairs(waypoints) do if waypoint.Action==Enum.PathWaypointAction.Jump then if not(hum:GetState()==Enum.HumanoidStateType.Freefall) then hum:ChangeState(Enum.HumanoidStateType.Jumping) end end hum:MoveTo(waypoint.Position) hum.MoveToFinished:Wait() end
@chezzodev
8 ай бұрын
Thank you, been trying to figure out what was wrong with my code ♡☆
@xOmqduperJJ
3 ай бұрын
Update: you no longer need a plugin to insert your own avatar, I know this video wasn't young enough to notice but you now can use the built-in "Rig Inserter" to insert your own avatar, How? Besides Block, Mesh, Slender, and RThro there is a "Your avatar button".
@aabd-fj9tq
17 күн бұрын
but this plugin is helpful i use it to insert my friends avatar
@fred_uh
2 жыл бұрын
POV: ur watching this in 2022 cuz you don’t know how to code yet
@floof6896
2 жыл бұрын
pov: you know how to code and know all the basics and most advanced things but you just need to know how to code an ai
@phoenixfire4393
Жыл бұрын
Lol
@phoenixfire4393
Жыл бұрын
I'm in 2022 cuz I'm learning how to code
@BRY0402
Жыл бұрын
@@floof6896 tru
@XYWZExtreme
Жыл бұрын
The Jokes on You,I forgot everything aside from the very basics of the syntax and redoing the advanced series again
@Oof_the_gamer
4 ай бұрын
Is it just me or did someone also tried to make Yuji chase you in 2024
@tuffer.
2 жыл бұрын
If anyone want's to make it so that it creates a new waypoint to follow when you move the end part then copy this script: local PathFindingService = game:GetService("PathfindingService") local hum = script.Parent:WaitForChild("Humanoid") local torso = script.Parent:WaitForChild("Torso") -- A little feature that I added to put the spheres inside a folder to make it less messy in the workspace local PathSpheres = Instance.new("Folder") PathSpheres.Name = ("Paths") PathSpheres.Parent = game.Workspace local path = PathFindingService:CreatePath() path:ComputeAsync(torso.Position, game.Workspace.EndingPart.Position) local Waypoints = path:GetWaypoints() path.Blocked:Connect(function() end) for i, Waypoint in pairs(Waypoints) do local part = Instance.new("Part",game.Workspace.Paths) part.Shape = "Ball" part.Material = "Neon" part.Size = Vector3.new(0.6, 0.6, 0.6) part.Position = Waypoint.Position + Vector3.new(0, 2, 0) part.Anchored = true part.CanCollide = false if Waypoint.Action == Enum.PathWaypointAction.Jump then hum:ChangeState(Enum.HumanoidStateType.Jumping) end hum:MoveTo(Waypoint.Position) hum.MoveToFinished:Wait() end while wait(0.15) do local part = Instance.new("Part",game.Workspace.Paths) part.Shape = "Ball" part.Material = "Neon" part.Size = Vector3.new(0.6, 0.6, 0.6) part.Position = torso.Position - Vector3.new(0, 1, 0) part.Anchored = true part.CanCollide = false hum:MoveTo(game.Workspace.EndingPart.Position) end
@rayanitalo3478
Жыл бұрын
thank you you are a life saver
@ThunderStudio1380
5 ай бұрын
stuck on this part my error is "Unable to cast Instance to Vector3" local PathfindingService = game:GetService("PathfindingService") local human = script.Parent:WaitForChild("Humanoid") local torso = script.Parent:WaitForChild("Torso") local path = PathfindingService:CreatePath() path:ComputeAsync(torso.Position, game.Workspace.EndingPart) local waypoints = path:GetWaypoints() for i, waypoint in pairs(waypoints) do human:MoveTo(waypoint.Position) end human:MoveTo(game.Workspace.EndingPart.Position)
@pyschofritz8955
3 ай бұрын
In your ComputeAsync function, you wrote game.Workspace.EndingPart instead of game.Workspace.EndingPart.Position. The error message is saying that you're attempting to treat a physical object as a position value
@noam190
4 жыл бұрын
to avoid it getting stuck you can just keep generation a waypoint and move to index 1 everytime
@squidiskool
4 жыл бұрын
What? I don't know what you are saying?
@bigamingplayer2409
2 жыл бұрын
You should just make it generate a waypoint only every time it gets stuck because if you keep generating waypoints constantly, it will take up server ram and cause lag which isn't good for optimization, Great Idea though!
@QwertyAndrew
4 жыл бұрын
The NPC doesn't move nor giving any errors to the output server, any ideas why?
@QwertyAndrew
4 жыл бұрын
Fixed, the root part is anchored lmao
@onirunedisciples
4 жыл бұрын
@@QwertyAndrew Thanx man! I had the exact problem and I didn't know what it was, but thanx to your little comment, I fixed it too.
@QwertyAndrew
4 жыл бұрын
onirunedisciples no problem bro
@gdev6632
2 жыл бұрын
If you want to you can add more parts to make like a smooth line like this: local PathFindingService = game:GetService("PathfindingService") local Human = script.Parent:WaitForChild("Humanoid") local Torso = script.Parent:WaitForChild("Torso") local path = PathFindingService:CreatePath() path:ComputeAsync(Torso.Position, workspace.endingPart1.Position) local waypoints = path:GetWaypoints() for i, waypoints in pairs(waypoints) do Human:MoveTo(waypoints.Position) Human.MoveToFinished:Wait(2) end local path = PathFindingService:CreatePath() path:ComputeAsync(Torso.Position, workspace.endingPart2.Position) local waypoints = path:GetWaypoints() for i, waypoints in pairs(waypoints) do Human:MoveTo(waypoints.Position) Human.MoveToFinished:Wait(2) end
@KyleBunnyBunsYTube
2 жыл бұрын
how do i make it so that the NPCs don't walk into the walls while trying to get to waypoints
@Jonskipvp
2 жыл бұрын
@@KyleBunnyBunsYTube Keyboard
@alplayzmc3034
4 жыл бұрын
Great video but at 13:39 why didn't you just type humanoid.Jump = true. Instead of all that other stuff? Also, you didn't get rid of the strait moveto
@clov3r527
4 жыл бұрын
Does it work the same I have never tried it but I will try it if it works.
@mickeypoophead4566
2 жыл бұрын
What if I want to have two checkpoints and I want the NPC to walk in a loop without stopping?
@WaW_Real
2 жыл бұрын
yeah thats a problem XD
@vibemusic6478
2 жыл бұрын
@@WaW_Real no its not its really easy :/
@IceCube_Games
2 жыл бұрын
How do i do the path.blocked thing?
@pukmint
2 жыл бұрын
How do you make a new path if the old one gets blocked?
@afterpartyslays
6 ай бұрын
you probably do path:ComputeAsync() again (but i havent tried it)
@ShohratPermanov639
4 ай бұрын
Bro proved that he is not dumb💀 16:33
@itskindasimple4523
4 жыл бұрын
You are welcome. local PathfindingService = game:GetService("PathfindingService") local human = script.Parent:WaitForChild("Humanoid") local torso = script.Parent:WaitForChild("Torso") local path = PFS:CreatePath() p:ComputeAsync(t.Position, game.Workspace.endingPart.Position) local waypoints = p:GetWaypoints() for i, waypoint in pairs(waypoints) do local ball = Instance.new("Part") part.Shape = "Ball" part.Material = "Neon" part.Size = Vector3.new(0.6, 0.6, 0.6) part.Position = waypoint.Position + Vector3.new(0,2,0) part.Anchored = true part.CanCollide = false part.Parent = game.Workspace if waypoint.Action == Enum.PathWaypointAction.Jump then human:ChangeState(Enum.HumanoidStateType.Jumping) end human:MoveTo(waypoint.Position) human.MoveToFinished:Wait(2) end human:MoveTo(game.Workspace.endingPart.Position)
@esdrcftguybhijnkmolkmoijtd4865
4 жыл бұрын
literally full of errors
@Mossers
4 жыл бұрын
stappp I wanna learn
@Pix001
3 жыл бұрын
Script just doesn't seem to work for me I have no idea why :(
@thetrickyitch7179
4 жыл бұрын
So with this method, which matches what's on the wiki for pathfinding, the pathing NPC will start to momentarily pause at each point along the path. You can see this start at 19:22. Any idea how to correct this?
@somedude0001
2 жыл бұрын
Basically in the script at the first put: script.Parent:SetNetworkOwner(nil)
@Yo_Bl
2 жыл бұрын
This is the clearest tutorial on this I have found! This stuff is great!!! If this doesnt earn a sub from everyone idk what does
@NecronyxRB
4 жыл бұрын
Hey DevKing do you think we could teach the AI to climb and swim? Edit: oh wait nvm you can! Edit 2: ok so the AI can’t actually calculate them being able to climb so it disables there ability to jump, maybe we could fix thris
@NLFO4EVER
2 жыл бұрын
NON of my scripts never work and there are no errors at all WHYYYYY
@iplaysroblox7646
3 жыл бұрын
Thank you so much, i've been scripting for a while(6 months-ish) and this helped me alot I cannot thank you enough for this
@Beij1ngCorn
2 жыл бұрын
I love your videos, they're funny and useful
@XeviousGG
4 жыл бұрын
what about when it plots a course through a small gap that it cant fit through? i suppose that falls under the blocked category?
@falkyraizu3063
4 жыл бұрын
Then the humanoid jumps
@axmist7189
4 жыл бұрын
Tysm this was a useful tutorial!
@spongous4826
4 жыл бұрын
is it possible for the NPC to pathfind a player instead of a brick?
@Iron88321
6 ай бұрын
You could add a simple player finder as well, so have it say patrol with the brick system then it will break off when it sees a player and then it would go back to patrolling when player is dealt with or far away
@ManliestGaming
4 жыл бұрын
while true do wait() print("Use Code Tap") end Best script ever :D
@Gadavious101
3 жыл бұрын
@@Red-Rocket221 No use RunService while wait() is not optimized it will just cause lag
@Red-Rocket221
3 жыл бұрын
@@Gadavious101 ye my bad I wrote that after everyone was telling me to use while wait()
@dawsify6393
4 жыл бұрын
could you make a tutorial about making learning ai from hello neighbor the stealth horror game. so that the bot learns and sets up traps and blocks doors the more times you go into a certain area
@MrCreepyPeach
4 жыл бұрын
that sounds way too advanced to be explained in one video
@crystalscreens9057
4 жыл бұрын
Bro, even piggy doesn't have that.
@doggosaurs3489
3 жыл бұрын
Roblox pathfinding is not that advanced
@Aa-YmDS_h4t6yW_0BPn4zbyYp.a5_E
3 жыл бұрын
2030 have that
@rc8s
3 жыл бұрын
idk why everyone is acting like it's making the ai become sentient, you can just check if the player went in a certain area and then make the ai set up more traps. Hello neighbor AI isnt that good
@greyastroids333
2 жыл бұрын
If you guys are having issues with the pathfinding unanchor the humanoidrootpart
@dozoneamvs3130
2 жыл бұрын
your a genius lad thank you
@JoshuaDZ
4 жыл бұрын
Here is the script for you all to copy and paste :D endingPart = game.Workspace.endingPart --change this to where it is in the workspace while true do local PathfindingService = game:GetService("PathfindingService") local human = script.Parent:WaitForChild("Humanoid") local torso = script.Parent:WaitForChild("Torso") local path = PathfindingService:CreatePath() path:ComputeAsync(torso.Position, endingPart.Position) local waypoints = path:GetWaypoints() for i, waypoint in pairs (waypoints) do if waypoint.Action == Enum.PathWaypointAction.Jump then human:ChangeState(Enum.HumanoidStateType.Jumping) end human:MoveTo(waypoint.Position) human.MoveToFinished:Wait(2) end human:MoveTo(endingPart.Position)--change here end while true do local PathfindingService = game:GetService("PathfindingService") local human = script.Parent:WaitForChild("Humanoid") local torso = script.Parent:WaitForChild("Torso") local path = PathfindingService:CreatePath() path:ComputeAsync(torso.Position, endingPart.Position) --change the endingPart to the part you want it to walk to local waypoints = path:GetWaypoints() for i, waypoint in pairs (waypoints) do if waypoint.Action == Enum.PathWaypointAction.Jump then human:ChangeState(Enum.HumanoidStateType.Jumping) end human:MoveTo(waypoint.Position) human.MoveToFinished:Wait(2) end human:MoveTo(endingPart.Position)--change here end
@teamcatyt4503
4 жыл бұрын
what do u mean by --change this to where it is in the workspace
@JoshuaDZ
4 жыл бұрын
@@teamcatyt4503 change it to the name of the part
@teamcatyt4503
4 жыл бұрын
@@JoshuaDZ its a model. The script i am putting is in the npc. I insert the name of it and next the pos?
@DanielP533Scripts
4 жыл бұрын
@@teamcatyt4503 You should watch the beginner's series and work your way up. This script should be easy to comprehend.If you want the destination to be a model, then set the primary part of that model and set it there. This is why you watch the video to learn and not just copy/paste from description
@theyarecloseultra942
4 жыл бұрын
Stop making people lazy
@kitkatcitcat5761
3 жыл бұрын
i put a part be proud of me
@wingsonlai1132
3 жыл бұрын
How to make the character keeps chasing the endingPart? Supposing the endingPart is an active player. And there will be a moving barrier interrupts or steps on the originally calculated path, so the character re-calculates the best shortest path every second.
@yesno4248
3 жыл бұрын
do it on stepped
@wingsonlai1132
3 жыл бұрын
@@yesno4248 I suppose you mean when every single step is reached then recalculate the path, thanks!
@truestponchopower4705
3 жыл бұрын
While loop possibly
@dareldavidiscol
2 жыл бұрын
just do while true loop
@cafebars3355
2 жыл бұрын
@@dareldavidiscol RunService would be better
@rockman6258
3 жыл бұрын
for some reason when i ran the script my character was bald with no accessories
@TrixTheDev
3 жыл бұрын
The truth of your character has been revealed....
@rockman6258
3 жыл бұрын
@@TrixTheDev uhhhhhh
@jaspersakk2387
2 жыл бұрын
It looks a lot more complicated with dark mode on
@BeanBoyTrev
28 күн бұрын
guys if you have a custom rig that rotates when it runs you need to go into the humanoids properties and turn off auto rotate under control section
@felixiplang
4 жыл бұрын
What about making a part go to another part using pathfinding?
@ausbossmoved
2 жыл бұрын
make the npc invisible and attach your part to it
@aunber
2 жыл бұрын
@@ausbossmoved or just tween along the waypoints like you'd normally do
@romoney
3 жыл бұрын
0:38 let's go ahead and get a bank + blake baseplate out here
@harveyflaxcaster8257
4 жыл бұрын
Every tutorial I watch nothing works and I'm getting sick of it. I've already smashed two keys in because of it
@ArielGibson757
4 жыл бұрын
On line 11 , the word waypoint , on my computer it says it's errored . So I tried putting a s at the end of it like the blue thing that pops up suggested . Neither worked . Am I missing something ? I double checked also
@harveyflaxcaster8257
4 жыл бұрын
@@ArielGibson757 if your bullet is not firing make sure it is not on the ground
@alve_n.s.f8953
3 жыл бұрын
Amazing 👏👏👏👏👏 Keep up The good work! 😀 😀 😀
@simplerpianisto6699
4 жыл бұрын
Hey man, i checked this tutorial out just to learn pathfinding and its super helpfull. I already made my own pathfinding function through a whole map and everything but when i move around the mob it sometimes just gets confused and stops moving. Is there maybe a solution for this?
@alive4269
2 жыл бұрын
send a code, we'll help you troubleshoot
@dopxy9219
2 жыл бұрын
@@alive4269 a year late
@Luke_alaxander
10 ай бұрын
what@@dopxy9219
@Luke_alaxander
10 ай бұрын
do you still need help
@TheSaiyanDoge
4 ай бұрын
mine didnt even move
@CloverKismet
3 жыл бұрын
Apply Auto-Subtitles here (20:24). What a slip up, DevKing; RIP my innocent brain.
@CloverKismet
3 жыл бұрын
Those darn Criminals tainting my Lua education..
@olib3a_r655
2 жыл бұрын
Lol
@ninjashank1480
4 жыл бұрын
are u gonna explian path.blocked
@JonasGuyGaming
4 жыл бұрын
It doesn’t even work
@XXVIGD
2 жыл бұрын
It did work
@Random-pc1cs
Жыл бұрын
"i know you're stupid little boy, one day you learn uhh oh i eh" this got me dead lmao
@isaiahbenjamins8818
3 жыл бұрын
Im a little late to the party but how would i make the npc move towards a player?
@Gadavious101
3 жыл бұрын
watch the next video
@chanchowaton
3 жыл бұрын
make that the ending part is FindfirstChild:("HumanoidRootPart")
@isaiahbenjamins8818
3 жыл бұрын
Ight thx dude
@chanchowaton
3 жыл бұрын
@@isaiahbenjamins8818 btw u have to get the position of the thing not just the block
@isaiahbenjamins8818
3 жыл бұрын
ye ight thx
@JimmyButBetter
2 жыл бұрын
Just spending a few hours on roblox devhub repeating the basic coding lessons and then coming here its easier to understand what a part of code does and not directly copy paste something someone made not knowing what it does.
@NotReallyNeon
2 жыл бұрын
Here's the code if anyone wants all the waypoints to show before he starts moving, with colour changing waypoints when he gets to that waypoint: local Pathfind = game:GetService("PathfindingService") local Humanoid = script.Parent:WaitForChild("Humanoid") local Torso = script.Parent:WaitForChild("Torso") local Path = Pathfind:CreatePath() local Target = workspace.Target local GenPoint = nil local PointArray = {} local Folder = Instance.new("Folder") Folder.Name = "Waypoints" Folder.Parent = workspace Path:ComputeAsync(Torso.Position, Target.Position) local Waypoints = Path:GetWaypoints() for i, v in ipairs(Waypoints) do GenPoint = v print(GenPoint) table.insert(PointArray, GenPoint) local Point = Instance.new("Part") Point.Anchored = true Point.Shape = "Ball" Point.Size = Vector3.one*0.5 Point.Position = v.Position + Vector3.new(0,2,0) Point.CanCollide = false Point.Parent = workspace.Waypoints Point.Name = "Point"..tostring(i) end for i2, v2 in ipairs(PointArray) do if v2.Action == Enum.PathWaypointAction.Jump then Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end Humanoid:MoveTo(v2.Position) Humanoid.MoveToFinished:Wait() workspace.Waypoints["Point"..tostring(i2)].BrickColor = BrickColor.new("Camo") workspace.Waypoints["Point"..tostring(i2)].Material = "Neon" end
@bugydigital
Жыл бұрын
THANK YOU I NEEDED THIS
@jan251025
2 жыл бұрын
you can turn on nav mesh to see where he can stand on and where not
@JohnnyLiberal69
4 жыл бұрын
I kinda wish I had waited for this video...
@TheDevKing
4 жыл бұрын
lol uhh well now its here! :)
@garyplays2017
4 жыл бұрын
i like ur tutorials alot bcs u explain everything step-by-step
@BertusTheGreat1
4 жыл бұрын
tap water
@malikplayz8608
4 жыл бұрын
ㄚ 乇 丂
@asrtrifecta4765
Жыл бұрын
hey thanks so much! i figured out how to make my character go back and forth between two parts!
@sour-1301
10 ай бұрын
POV: ur watching this in 2023 because u don't know how to code yet
@PoboyMusic
4 жыл бұрын
Thanks for all your vids man.
@TheWhiteDaffodils
4 жыл бұрын
If u guys are making an npc that shoots u but stays further away, well what u gotta do when the npc s searching for the player, turn the pathfinding on, the when npc is close enough, turn it off. Simple!
@kirillfedorenko5325
6 ай бұрын
im also improving my english watching your tutorials and not just scripting skills!
@mna.author
2 жыл бұрын
For me, the script worked and everything was fine, but when I put a more complicated one with more jumping, it doesn't work. What could cause such an issue? Update: It is not reading the for loop. Does anyone know why?
@n1cmo580
10 ай бұрын
Im not to far into the video and im just trying to figure out how to make it move --Services local PathFindingService = game:GetService("PathfindingService") --Objects local human = script.Parent:WaitForChild("Humanoid") local torse = script.Parent:WaitForChild("Torso") local path = PathFindingService:CreatePath() path:ComputeAsync(torse.Position, game.Workspace.endingPart.Position) human:MoveTo(game.Workspace.endingPart.Position) This is the code I have now but it wont actually move to the part does anyone know why?
@kzfavors1367
9 ай бұрын
Try the vid again just follow what he does
@kzfavors1367
9 ай бұрын
local PathFindingService = game:GetService("PathfindingService") local human = script.Parent:WaitForChild("Humanoid") local torso = script.Parent:WaitForChild("Torso") local path = PathFindingService:CreatePath() path:ComputeAsync(torso.Position, game.Workspace.PathfindingEndPart.Position) local waypoints = path:GetWaypoints() for i, waypoint in pairs(waypoints) do local part = Instance.new("Part") part.BrickColor = BrickColor.new("Lime green") part.Size = Vector3.new(0.5, 0.5, 0.5) part.Material = "Neon" part.Position = waypoint.Position + Vector3.new(0, 2, 0) part.Anchored = true part.CanCollide = false part.Parent = game.Workspace if waypoint.Action == Enum.PathWaypointAction.Jump then human:ChangeState(Enum.HumanoidStateType.Jumping) end human:MoveTo(waypoint.Position) human.MoveToFinished:Wait(2) end Use this script, if it doesnt work then theres something wrong with the actual character that needs fixing
@wuyaya7849
3 жыл бұрын
the "smart" zombie does not go all the way round. The goes around the first wall then decides that he can't be bothered to walk around the second wall. He walkeds into it and stops.
@KyleBunnyBunsYTube
2 жыл бұрын
literally every single tutorial i watched doesn't even do anythng to make it so that the NPC doesn't walk straight into walls.
@specsamhain_909
Жыл бұрын
i'm having the same issues too..!
@specsamhain_909
Жыл бұрын
i tried this, but something unusual happened, they seemed to be hellbent on bunching up at a certain point on the map that was odd, before moving on to the goal... i don't know how to fix this...
@RennFrenz
3 жыл бұрын
sometimes it doesn't work. like the npc doesn't go through the part, but goes and gets stuck in the part
@crafterwildchannel2511
2 ай бұрын
guys you dont need the jumping one just add waypoint:Destroy() because zombies are stupid and they break everything they see in their path
@Mcnikkins75
3 жыл бұрын
The most important thing I learnt is NEVER EVER CHALLENGE AIs OR AI BOTS. PS most funniest video by mat--no the devking
@superduperman8287
2 жыл бұрын
I took a break for a long time from this series and after this ill be going to new territory! "I was just reviewing to refine my skills"
@Voided2
2 жыл бұрын
THANKKK YOU MAN I FINALLY KNOW HOW TO USE PATHFINDING!!!
@K4E1234
3 жыл бұрын
i made it, made a cool path and for some reason it flies over the parts, lol. i know this is still kinda like an "alpha" pathfinding service but ye, nice vid
@aioslps
3 жыл бұрын
Help me pls I’m a new beginner on programming roblox games can you please make a tutorial on basic scripting? Sorry if you did you see I’m new and have recently subbed
Пікірлер: 993