How To Make An Enemy NPC In Roblox Studio

preview_player
Показать описание
🌟 Join our discord community to collaborate with other devs, discuss roblox studio, ask for scripting help, and much more!

👍 If you enjoyed the video, leave a like and subscribe, it genuinely helps me out a lot!

💬 Leave a comment telling me what you think, I'm always happy to hear what my viewers like and what videos they want to see in the future!

🤔 What is Roblox? Roblox is a universal platform where you can let your imagination run free. Players can upload games they themselves have created through Roblox's development software, Roblox Studio. Roblox is a huge platform where friends, family, and others can play together, have fun, and make memories. It inspires creativity, friendships, teamwork, building, and cooperative play. A platform where all are welcome.

🎵 Music
1.) Bloo Bay Beach - Paper Mario Color Splash - Nintendo
2.) Portal Radio Theme - Portal - Valve

#roblox​​ #robloxstudio​​ #robloxstudiotutorial #robloxstudiodevlog
Рекомендации по теме
Комментарии
Автор

local npc = script.Parent
local tracking = false

function onPlayerTouch(other)
if other:IsA("Player") then
other:Destroy()
tracking = false
wait(5)
tracking = true
end
end

function trackPlayer()
while true do
if tracking then
local closestPlayer = nil
local closestDistance = math.huge

for _, player in do
local distance = (npc.Position -
if distance < closestDistance then
closestDistance = distance
closestPlayer = player
end
end

if closestPlayer then

end
end

wait(1)
end
end



trackPlayer()

Yami_YT
Автор

tthank u so much this helped with my game so so much it rlly needed a enemy for it

MrBacon
Автор

Hey, i was wondering if u could update your paste bin script link because it's expired or removed or just some error to do with the link or page because it says page not found

Icypenguin
Автор

Always making good content! I like it.

xbomb
Автор

You know, you can just pull a person from the built in setting for making a rig... but this video was still helpful so thank you!

elykona
Автор

I swear i wasnt expecting it to work but im glad i tried it anyways- u deserve a new sub and alot more!

randomperson
Автор

Thank you I will use this in so many of my games

Scouty
Автор

After some testing, I have a question. How can I make the NPC no longer deal damage to the player after it is killed?

Nebula_Protogen
Автор

Nice video, this helped me a lot for the horror game I’m making. U earned a new subscriber :D

smileyface
Автор

Can someone make it only when it sees u it starts running but when ur out of view it just roams?

KapustaDihno
Автор

how can i make it so the enemy NPC has to be looking at me so it deals damage (so i would be able to attack it from behind)

AwS
Автор

bro then how we will defeat him cuz he chases and kills us it is working perfectly but if i use gun from toolbox it does not kill or damage him bro pls help

bakshishbajwa
Автор

how tf did i mess this simple stuff up 💀 edit: i deleted some additional words he made and it worked

AnotherOxygenInhaler
Автор

LITERALLY THANK YOU!! THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK

tettymeow
Автор

how the scripters invent codes, thats hard asf

Lautaroz
Автор

Also if anybody knows the answer, If you change or make your own animations does the script still make the NPC do it?

Dogey_Dogger
Автор

how do you make his fov bigger so he can chase you no matter how far away you are

FraserBear
Автор

idk if its just me but i could not damage the npc so how do you?

lordchicken
Автор

I didnt even notice i took one hour to make a monster and i forgot i had this video just waiting💀

Cdeez
Автор

For some reason every single tutorial either has it so they don't damage you, or they just attack eachother

Random_Idiot