#how do i make an enemy npc spawn bear traps ocassionally near him?

1 messages · Page 1 of 1 (latest)

onyx iron
#

i wanna make a npc which functions like granny

woeful glade
#

just take its humanoidRootPart.cframe generate a random position around it nd clone the trap to tht position

onyx iron
#

im trash

#

help me

fathom gazelle
#

Local trapPosition = player.Character.HumanoidRootPart.CFrame + Vector3.new(math.random(-20, 20), 0, math.random(-20, 20))

Npc.Humanoid:WalkTo(trapPosition)
Npc.Humanoid:MoveToFinished:Connect(function()
(put your bear placing function here)
end)

fathom gazelle
drowsy dragon
#

sort of advanced if you want it to be good have to setup ai paths for a good npc if not then make it random for granny they use pathfinding and waypoints as it sucks but you can use a path layout and pathfinding and make it smooth and more realistic thats what gta 5 does then have points along those paths where if passed have like a 1 in 3 chance of placing a trap

onyx iron
#

im trash at coding

#

dont ask me

charred ruinBOT
#

studio** You are now Level 1! **studio

onyx iron
#

i dont know

#

how do i do this

willow helm
onyx iron
#

nah whats this