Whitelist and Blacklist are deprecated, you have to use Include and Exclude respectively, good luck with coding everyone
@erglwrgl Жыл бұрын
Yea it's annoying, I think that's very recent because I remember only a few months ago going onto my game and seeing a red underline on all the "Blacklists" so I had to change like 20+ scripts to "Exclude"
@EATBADGE Жыл бұрын
@@erglwrglYou can just use the replace world feature to replace everything :/
@baconoculto1392 Жыл бұрын
Ty
@VroomVroomCar2219 ай бұрын
yoo thank you man i was trying to figure out why it wouldnt work!
@poorlymadeproduction8 ай бұрын
why do those freaks keep doing that
@EliseyzScripts Жыл бұрын
BRO thank you so much! i am glad i found you because the first thing you said was "how to check if part can see another part" and this is exactly what i was searching for!
@miniamobfighter7271 Жыл бұрын
For "While True" loops, instead of having to put a delay at the end of the loop, you can do While wait() do -- Code here end
@AntiNuke_11 ай бұрын
It's actually more efficient to use task.wait(), because wait is deprecated
@boblox_studio_dev7 ай бұрын
putting task.wait inside of while true do is better than putting while task.wait
@yarik_superpro3 ай бұрын
that not really a good idea to do
@fandedeto46033 ай бұрын
nub
@KapruzАй бұрын
i know its been a year but dont do that
@Cookibot Жыл бұрын
For any new people, Roblox removed Enum.RaycastFilterType.Blacklist and Enum.RaycastFilterType.Whitelist: Now Blacklist is Enum.RaycastFilterType.Exclude And Whitelist is Enum.RaycastFilterType.Include Hope this helps :)
@bigboy_atom Жыл бұрын
Thanks for your help!
@ben252 Жыл бұрын
damn and i thought i did something wrong, thanks.
@titanwhy4284 Жыл бұрын
Thank you
@programmedchip Жыл бұрын
Thanks!
@PhantomInTheNight19 Жыл бұрын
just realized with this i can make pizza tower's "dont make a sound" mechanic. this is going to be so cool
@pe_w Жыл бұрын
Can you explain this more if sounds like an interesting concept
@anotherdeadchannel Жыл бұрын
@@pe_wI think depending on the distance they won't make a sound
@RammansPizzas Жыл бұрын
@@pe_wIn the Level they are Patrollers going around and if you get spotted, they count down from 5, giving you time to kill them and if it hits 0 then a Animatronic will start chasing you.
@Spez_art10 ай бұрын
You don't need raycasting to do that. You can just use .magnitude to see the distance between the positions of their root parts.
@quimi_co4 ай бұрын
Omg it's the almighty Sam from bear alpha!! 1!
@workindad2 жыл бұрын
Excellent tutorial. I’ve been working on raycasting in my game and have been unfamiliar with how the ray is being generated/set. This vid answers a lot of questions. Ty.
@killa5963 Жыл бұрын
This is incredibly helpful, but the only problem is it's the position of the part, and not the surface of it. So sometimes you're left with this awkward situation where you'd think it would be able to see the target part if it was the edge of another part at a different Y position, but it can't since the position of the part is at the centre, rather than the closest point of it, relative to the search part.
@EATBADGE Жыл бұрын
You can easily modify it so that the origin is on the surface on the part, just do simple math.
@Miguel_Angel5111 ай бұрын
I want to know that "simple" math, when he said about calculate surface i remembe vietnam moments, aint no way soneone calculate so many possible points like volumetric sound
@Trashbinfin Жыл бұрын
Thanks! A lot more simple than i thought! You are very underrated.
@reduvicemaster Жыл бұрын
you can also calculate direction at workspace:Raycast() part using CFrame:LookAt()
@WardenYouTubeMc Жыл бұрын
Nice explained and simple, now I can make stuff like you have to move a part until it sees the other part to open a door!
@JamesNJoe2 жыл бұрын
Great tutorial gnomecode! I love seeings these kinds of tutorials. I watch these while waiting for doors part 8. Good stuff.
@goose-h2f11 ай бұрын
With this you can also do the doctor who angel mechanic for a horror game, interesting
@BloxyBud749 ай бұрын
Thank you most tutorials are outdated or confusing this helped alot
@Vivi_sf2 жыл бұрын
Hey Gnome! I have been watching your videos for a while now, since they are the only ones that actually teach me lol. I wanted to ask you to do a simple Object Oriented Programming guide for roblox studio. Apparently, it's a way to make your code more organized and efficient, some people say it's really important
@itsray52572 жыл бұрын
Yes, we need an OOP series
@Imde84373 ай бұрын
This remembers me so much to rush from doors, im talking about it hitbox, if he is behind a wall and your on the opposite side, it wont kill, but if he is able to see/detect your humanoid without being behind the wall, it will kill, its very weird, i wanna learn how to do that tho.
@creepermods4641 Жыл бұрын
Even though the title confused me, instead... The title should be *How To Make Line Of Sight* but this is really helpful because i need to make line of sight!
@mediocrecontent9876 Жыл бұрын
Thank you. I have been really confused with raycasting. Now I fully understand how it works. Thanks GnomeCode!
@XaneMyers Жыл бұрын
I agree with others, this seems to be a good tutorial! I've heard that Roblox has added "shape-casts" sometime recently, though. I wonder how those work compared to raycasts, which are just drawing a line from a position in a specific direction.
@SirMarny2 жыл бұрын
I was hoping the ball would turn yellow at the last second haha... anyways great informative video! thanks!
@Snory99 Жыл бұрын
thank you so much for this man. i cant describe in words how thankful i am
@dr.albitros42422 жыл бұрын
The perfect video! Haven't watch it whole yet, but surely it will be good! :)
@Specter109 Жыл бұрын
thank You So Much For Making This Video, this is very Helpful For Me Because Im Making A Battleship Tower On My Td Game And I had A Small Turret Which I Want It To Shoot if It Detect The Target And I Didn't Know Anything About raycasting until now, thx for making this video
@FlamezStudioYT2 ай бұрын
For a combat system, should I be using a raycast or blockcast? I’ve been using blockcasts because of a wider hit range but I’m not sure if it’s actually optimal.
@pearc2 жыл бұрын
Thank you gnome for this advice. Just to be clear I've been watching since 1k subs seeing you grow this far in a year is impressive for me. Thank you for always being here for us!
@GnomeCode2 жыл бұрын
Thanks for sticking around :)
@Cowboy_Hat202 Жыл бұрын
@@GnomeCodehey could you continue with your doors tutorials? Maybe ambush or cruzifix
@투코이2 жыл бұрын
I can finally script Eyes!
@IgnatiousRainwater10 ай бұрын
remember the reason there is no need for ~= nil in the if statement is because (in lower-level languages) the condition syntax secretly has a `identifier == 1` which 1 meaning true saying the identifier does exist. If you use the `NOT` keyword or `!` operator then it's opposite (0). All of this happens behind the language interpreter
@ferret92634 ай бұрын
I don't think lua has the ! operator
@teenageapple37885 ай бұрын
With some more knowledge of what I wanna do. I could probably make a vehicle “antigravity” system. Like in Mario Kart 8. When the car is stopped upside down it doesn’t fall off!
@mojitta2 жыл бұрын
good video, we need pathfinding tutorial next
@LennyFace987 Жыл бұрын
Could u tell me how to raycast the object to the player?
@AzureGillsVEVO2 жыл бұрын
nooo! i wanted to see the ball at the end fall into the void! D: great tutorial though! can't wait to see more!
@YorktownClass Жыл бұрын
<a href="#" class="seekto" data-time="168">2:48</a> I thought that an error pops up when you reference 2 parts have the same name that are both located in the workspace.
@OutplayerR6 ай бұрын
Instead of 'Blacklist', use Exclude, As Blacklist is now depricated.
@GreatRamilYT2 жыл бұрын
hi, thanks for the new amazing video! I'm sure it will come in handy for many!
@bigbengamer57592 жыл бұрын
Wonder what part 8 of doors tutorials could be?! I was also wondering if you could show me how to make other hiding spots like beds or specifically for my map, an elevator!
@dawt8382 жыл бұрын
a bed hide mechanic would be kinda useless because it’s basically just the locker but with changed animations
@vrfrenzy8451 Жыл бұрын
elevator would be something like using tweenservice
@fexryourfriend2 жыл бұрын
Tip : you don’t have to cut and paste lines of code, you can just select it and drag it to your desired position
@epixerty2 жыл бұрын
nah, its faster to copy and paste because if you drag it it messes up the format and you have to do extra steps to format the code
@kennethkline77022 жыл бұрын
Yiu can actually "move" the block of code by holding alt and pressing the arrows too!
@fexryourfriend2 жыл бұрын
@@kennethkline7702 really?!
@fexryourfriend2 жыл бұрын
@@epixerty true but you may have something important in your clipboard
@epixerty2 жыл бұрын
@@fexryourfriend I use both, because youre right here, but i find copy and pasting more convenient most of the times
@Sv1x182 Жыл бұрын
i'm a legend i liked and it turned to 700 woah great vid
@probablyjaden Жыл бұрын
Blacklist and Whitelist are deprecated now, make sure you use Include and Exclude instead!
@eternlaw Жыл бұрын
Thanks man I needed to learn this for my entities (rush and ambush)
@jakejat2 Жыл бұрын
trust me raycast jumpscares are no easy bro
@eternlaw Жыл бұрын
@@jakejat2 I just tried it and it's is NOT easy. What happened was it only kills the player in a certain range. That range isn't big enough, it's like lookvector. Only if rush's part is facing towards the player. Then it will kill the player
@jakejat2 Жыл бұрын
@@eternlaw hmm thats seems like a problem with your raycasting script
@eternlaw5 ай бұрын
learned a while ago how to properly use it, and now I can use raycast
@320linkerbaan245 ай бұрын
for what is the minus at direction <a href="#" class="seekto" data-time="150">2:30</a>
@theguyunderwater4 ай бұрын
subtract
@Yeilding_HD2 жыл бұрын
i learn more about Raycasting cuz of that video thank you.
@hunivox Жыл бұрын
be careful y'all. app, the blacklist function has been deprecated and replaced with another one called "exclude", which does basically the same
@justmrkoala Жыл бұрын
now i realise that projectiles just are too complicated for me im happy that i finnally understand cframe and raycasting in a simple but effective way
@vestisdead Жыл бұрын
you can use the raycast to make Rush's (optionally Ambush's) AI in your Doors tutorial, right?
@alejandrorivera96942 жыл бұрын
Pretty good video, honestly very useful for paintballing games or whatever, but I need something important, How do I make the animate 2 script compatible with other scripts that load other animations?
@OfficialRBBBuildMode2 жыл бұрын
GnomeCode I love your tutorial videos and I like them can you do a leaderboard
@HamsterGamin0 Жыл бұрын
Thanks! i might try making AI visibility, with ray cast
@GodrickTheGoIden Жыл бұрын
Blacklist and whitelist have been depreciated and replaced with include and exclude. They work functionally the same though
@brainlessbrain78342 жыл бұрын
Can't wait lol, I'm always so confused by Ray casting
@vogoxmario93808 ай бұрын
bro i was having a mental break down for 2 hours, reached out to 2 forums and ai bots for it to be that for direction you dont use unit and its also reversed...
@sodiumchloride88862 жыл бұрын
damn bro thank u for creating this i literally wanted this right now lol
@templars442 жыл бұрын
Hey Gnome. Would you do a gamenight on christmas?
@masonbuk9092 Жыл бұрын
you made this so much more simple
@mmben13682 жыл бұрын
WHEN IS THE NEXT GNOMEJAM!!! IM SO EXCITEDDD
@bjorna.147Ай бұрын
<a href="#" class="seekto" data-time="275">4:35</a>, the Enum.RaycastFilterType.Blacklist is underlined by blue for me, maybe it’s because this is for a new year ago? Can SOMONE help me pls :(
@rSlashVideoАй бұрын
Now Blacklist is Enum.RaycastFilterType.Exclude And Whitelist is Enum.RaycastFilterType.Include
@chakira2822 Жыл бұрын
It helped me a lot when making scp 096 :)
@Retrainingr2 жыл бұрын
Hey can you make a video on how to make a monster like doors like you made last time but can you make it use raycasting so it kills you when the monster sees you like ambush? Also keep up the great work it helps alot!
@--Neptune-2 жыл бұрын
This is literally so helpful thanks
@THANUSNUS Жыл бұрын
btw im pretty sure roblox removed black list or sum so you gotta use exclude now
@danzstuff8 ай бұрын
i'm trying to make a web swinging system with raycasts, and i'm kinda stuck on the raycast direction part
@TheAtomPrince2 жыл бұрын
POV: you see a GnomeCode video from 12 minutes ago AND It's about something that always confused you
@alejandrorivera9694 Жыл бұрын
It's been a month... hope the next video comes out soon!
@chemreal2 жыл бұрын
Hey GnomeCode! I'm a beginner scripter and currently following your TD series. Of course, I'm adding my own features using what I learned from your tutorials. Everything's going well till I try to add a Gun Trail feature. I've tried twice but failed, is there something I'm missing on?
@atomizerplayz2 жыл бұрын
i dont have problems with the gun rail part. i have problems with the distance measuring.
@TheyAreGettingCloser2 жыл бұрын
I'm just going to assume that by that you mean you want a trail for the bullet. If you want that, then add a trail in the bullet and set the properties, and you should be good. If you are using a script that makes the bullet through the script, then add something similar to this to the script: local trail = Instance.new("trail") trail.Parent = bullet trail.lifespan = (whatever you want) (add some more properties)
@sillygoober3682 жыл бұрын
GnomeCode, can you make a tutorial on how to make a inverse kinematics spider that can move around?
@Pyr0Blox12 жыл бұрын
Yes I love to be early to this GnomeCode video
@cahwardev98042 жыл бұрын
Hey, I have a personnel question - what keyboard do you use?
@block_in_animating2 жыл бұрын
Thanks for the epic video! When will we get a doors tutorial? Just saying :)
@fabiankrajewski3147 Жыл бұрын
How do i code raycast from player to a random part?
@knifemeathead Жыл бұрын
You would use the player's humanoidrootpart or torso as the starting point for the raycast
@fabiankrajewski3147 Жыл бұрын
@@knifemeathead thanks
@Imbrokeyay Жыл бұрын
local Hunt = script.Parent -- Change this to the reference of your "Hunt" part local RaycastParams = RaycastParams.new() RaycastParams.FilterDescendantsInstances = {Hunt} while true do wait(1) -- Adjust the wait time to 1 second local Players = game:GetService("Players"):GetPlayers() for _, player in pairs(Players) do local Character = player.Character if Character then local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart") if HumanoidRootPart then local origin = Hunt.Position local direction = (HumanoidRootPart.Position - origin).unit local ray = Ray.new(origin, direction * (HumanoidRootPart.Position - origin).magnitude) local hit, _ = game.Workspace:FindPartOnRayWithIgnoreList(ray, RaycastParams.FilterDescendantsInstances) if hit == HumanoidRootPart then local humanoid = Character:FindFirstChild("Humanoid") if humanoid then humanoid:TakeDamage(10) end end end end end end
@TheyAreGettingCloser2 жыл бұрын
Thanks, this really helped alot with my understanding of raycasting! Appreciate it, keep it up!
@stinkyra__.t2 жыл бұрын
Thank you so much Gnome.
@berkecan58909 ай бұрын
What if i want a range for a ray tho? Like this ray goes to the other side of the planet and if i want to detect something near 50 studs for example i cant do that like that can i? it would be epic if you record and part 2 or Full guide to raycast
@cjdlegendary1795 Жыл бұрын
Now either, I don't know anything about programming (which is not true I know LUA, HTML 5, Python, not going to bother listing anything else because it doesn't aid my point. ) Or most of these tutorials describing shapecasts and raycasts are all so convoluted, this one is among them but at least I could grasp some of the information. I know what a raycast and a shapecast is, I know what their use cases are. but knowing when and how they are applied to a script is never shown in one of these videos, or they do and its usually within the heaps of talking people do in these tutorials. Goes through one ear out the other. If I get a comment trying to explain what a raycast or shapecast is/its use cases just like these tutorials do, I might outright ignore it unless you manage to give me a more in-depth view on it. Because your viewing me from the perspective of someone who does not know how to program, does not know how to reference from ROBLOX's API. Both of which I do know how to do, but unfortunately, reading roblox's api reference did not give me a clear understanding of how this works; which is a shame because usually to does. so currently, I know that I can blacklist/whitelist objects, then specify what it is I'm blacklisting/whitelisting. Cool, that works, understood; quite handy! raycast result returns as it states, the result of a created raycast; which I can use in my script. BAM context on not just its use case but WHERE it's applied to my script; other tutorials don't do this or they take far to long and do to much talking to get to this point; which, I described in terms far easier to understand in 3 sentences. This is why I stook with this tutorial. Let me describe my issue and I don't have access to ROBLOX forums so don't ask me to go there. Say I want to do as shown above, to get direction for CF ( CFrame ) I would compare a - b as done here. But what if what I'm comparing isn't a part in workspace for A? and my target B being a player model? Let me show off what I tried to do so that what I mentioned above becomes clearer, I have a part which is non-can collided in a FOLDER with my script within its own folder ELSEWHERE. This part is a zone, its invisible, but can be touched and quarried, My script is trying to look in pairs and it represents each part by " v " with its distinction being its name, So, I have a zone called " desert ", and another zone called " grasslands ": both are in the same music zone folder with only their names to make them unique. My script plays music when a player enters a zone, each song is named exactly to their zone counterparts so that the script can pick a song and match it according to a touched-zone's name. Neat, compact, butttttt this doesn't work. Why? Because the last method I utilized, used region3, which is depreciated and trust me I looked, there are some sources claiming it isn't but that's simply not true. So I started using shapecasts, and for the likes of me, I just don't know how to use them. I mean, I know the bare minimum, and I'm hoping watching this video on RAYcasts will allow be to at least understand the filtering which seems to be used for both shape casts and ray casts. And hopefully draw a line between the two and actually have a solid understanding of it. I'm gonna rewrite my entire code, including what I've learned from this video and what little I can learn from shape casts, by the way, don't look those up unless your willing to dig, youtubers don't know how to explain shapecasts well enough for application on your own; they just tell you what it does and how it can be used. And I think they do that because they think "casting shapes" is complicated, thus they can get away with taking more views from people: Even though I just described what it is and does in two words, casting, shapes.
@Nathan-hl1dm Жыл бұрын
Start by taking the stick out of your ass and get to the point of your 500 page pretentious comment. If you are not wishing for a reply, which you mention you don't in: "...I might outright ignore it..." because you are afraid of someone misrepresenting you under your fragile ego, maybe do not write a comment and just keep it to yourself. To answer your question anyways: "What if what I'm comparing isn't a part in workspace for A? and my target B being a player model?" The same thing still applies: -Get the world position of point A, which is not a part in the workspace. -Get the world position of point B, which is the target, like a player's character model. You can use the CFrame of the character's root part (usually HumanoidRootPart) to get the position. -Calculate the direction vector by subtracting the position of point A from point B. You mentioned an extremely important flaw though: you have a part which is nonCancollide. Rays do not interact with nonCancollide parts, so your method of making music zones with raycast will not work in its current state. The way you intend on creating music zones seems very impractical and it'd be much better to just use a simple Part.Touched script on a region defined by a giant cancollidefalse block. Why this wasn't your initial idea? You tell me.
@NotRynch2 жыл бұрын
Gnome is scary I was looking for a Raycast tutorial (I haven't made a game with Raycasting in a Year) and then this
@moshietter3206 Жыл бұрын
how exatcly would this work on legs though if you want the legs to move up when its on a higher elevation but not go literally above the waist/core?
@MadnessNull2 жыл бұрын
Rest in peace red ball you will be missed 😔
@XYWZExtreme Жыл бұрын
Simple,Straightforward,Yet explains very well thank you gnoemcode for this tutorial
@lopaq943 Жыл бұрын
Ты сигма крутой ты сигма сигма сигма сигма, ты сигма крутой ты сигма сигма сигма сигма, ты сигма крутой ты сигма сигма сигма сигма, ты сигма ты очень крутой сигма сигма.
@jsfk-mb1yr2 жыл бұрын
u should make a video about the group copying your games
@Hazuzis Жыл бұрын
thank you so much! i asked about that chat gpt but he does`nt answer me correct, but you really help me!
@ferret9263 Жыл бұрын
fr, chatgpt keeps giving bogus scripts that dont do jack shit
@thecatsgato5283 Жыл бұрын
Epic tutorial! Could you possibly show how to make something simular to SCP-096?
@teddydenney57885 ай бұрын
I'm trying to get this program to work with a replicated storage item. My program spawns in a sphere and then that sphere get's raycasted by a preexisting worldspace sphere. The program kinda works. Where the rep sphere spawns in and then turns red but it will not update position in the map and will not turn green even if it is directly next to worldspace sphere. here is my code local target = script.Parent local rep = game.ReplicatedStorage local a = Workspace.Shooter local b = rep.Target while true do local direction = b.Position - a.Position local raycastResult = workspace:Raycast(a.Position, direction) if raycastResult and raycastResult.Instance then if raycastResult.Instance == b then b.Color = Color3.new(.2,.9,.2) else b.Color = Color3.new(1,0,0) end end task.wait(1) print (raycastResult) end -PS great video btw
@PHros Жыл бұрын
Can anyone tell me what does ray casting do im a bit confused
@GnomeCode Жыл бұрын
If you have a point A, and a point B, and you want to know what (if anything) is inbetween them. This can be used for anything such as firing a gun (and calculating what it hits), to making an enemy AI (that attacks target on sight)
@PHros Жыл бұрын
@@GnomeCode Oh ty
@PHros Жыл бұрын
@@GnomeCode after 2 weeks i figured out what ray casting does
@1VRRR2 жыл бұрын
Quick question.Can you remake your 2d plat-former tutorial.I think your last one is a little outdated.Thank you!
@gimbus84932 жыл бұрын
Could you make a real time strategy tutorial please? I want to make one but don’t know how
@Skillverfish_ Жыл бұрын
So going back to AI could put raycasting inside of the killing AI? (Making it so every time the AI see`s you it gives a good chase...)
@Emilio.223 Жыл бұрын
How can i make a gun using raycasting, can u make a video about it?
@MaxLeft2 жыл бұрын
Day 2 on asking: Can you please show how to make a pokemon game? I came up with my own pokemon, but I don't understand how to make games.. I don't understand the Scripting well so that's why I use KZbin to help me!
@uru41232 жыл бұрын
You should make a video on how to make a War game!
@Neuxim142 жыл бұрын
A bit late but i have qestion to tower defense tutorial. You are showing how to do only one path ubgrades but I wanted to make 2 paths of ubgrades like in BTD5. Is there a way of doing that?
@TheyAreGettingCloser2 жыл бұрын
That script would be too advanced, so unless you have someone who knows lua well, it won't be possible.
@JoshieBoy_2 жыл бұрын
What's dat studio font :))
@blahblahbblahhhh2 жыл бұрын
Hiya! I am making a game but I need an NPC to be able to walk on walls - i can only find tutorials on it for the player and I can't figure out what I needed!
@yalisterreal11 ай бұрын
when i do the filter thing it says: member 'Blacklist' is deprecated
@FireFonce2 жыл бұрын
when the doors series videos? i miss them :(
@GnomeCode2 жыл бұрын
I will continue the series in the new year, I'm on Christmas break right now :)
@kryptonnslaxx63786 ай бұрын
how to make it transparent????????????
@Sp234192 жыл бұрын
When I open my script I can't find it it it's separated from workspace
@lorlema74042 жыл бұрын
Hi gnome I wanted to make a tower defense game but the tutorial is now outdated, Can you please remake it?
@Davisillo9173 Жыл бұрын
Doom is not done alone
@silvermist_studios Жыл бұрын
I remember first starting Roblox Studio and remembering "I'm going to need to learn Ray Cast" and I struggled so much, but thanks to this amazing and short video I fully understand the basics of Ray Cast. I want to say thank you 😁
@astbrast10589 ай бұрын
why is the raycasting not working trought transparent walls? local a = workspace.Base local b = workspace.Target while true do local dir = b.Position - a.Position local params = RaycastParams.new() params.FilterType = Enum.RaycastFilterType.Blacklist params.FilterDescendantsInstances = {workspace.TraWindow} local raycastresult = workspace:Raycast(a.Position, dir) if raycastresult and raycastresult.Instance then if raycastresult.Instance == b then b.Color = Color3.new(1, 1, 0) else b.Color = Color3.new(1, 0, 0) end end print(raycastresult) task.wait() end
@wonsole7 ай бұрын
u didnt call the params
@starwarsdev2 жыл бұрын
Hey Gnomecode, i was thinking if you could maybe do a gnomejam again i would realy like that cause im a begginner developer and i would learn a lot from the gnomejam.
@dattereflex26072 жыл бұрын
Hey GnomeCode, I am looking to make a Dummy that only moves when you look away and the dummy will stay if you looking directly at it. But I do not sure how to connect the part and target directly to the player. Please give some advise
@ossianator92272 жыл бұрын
search on yt
@dattereflex26072 жыл бұрын
@@ossianator9227 no one made it 😢
@TheyAreGettingCloser2 жыл бұрын
I'm not the best but, maybe this could work? (local script in starterplayerscripts) local script2 = workspace.Dummy.AI_Script --(this is the ai for chasing the player) local head = workspace.Dummy.Head local playerTorso = script.Parent.Character.Torso while true do local Direction = head.Position - playerTorso.Position local raycastResult = workspace:Raycast(head.Position, Direction) if raycastResult and raycastResult.Instance then script2.Disabled = true else script2.Disabled = false end end (NOTES) If you want to add in any extra features, check the tutorial again to know how to edit this. This might not work, since like I said, I'm not the best. (If it doesn't work, check the tutorial again and try not to straight-up just copy.)