#how do i make an enemy npc spawn bear traps ocassionally near him?
1 messages · Page 1 of 1 (latest)
just take its humanoidRootPart.cframe generate a random position around it nd clone the trap to tht position
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)
Someone correct me if some of this is wrong
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
wat
** You are now Level 1! **
Nah bro
normally what happens to trash is it gets discarded and thrown away, sometimes incinerated
if you'd like to, well, not be trash at coding, try not being trash and learning how to code. start here: https://create.roblox.com/docs/en-us/tutorials/fundamentals/coding-1/coding-fundamentals
nah whats this