How would i make a Boss AI

I dont know where to start, i want the boss to wander around and randomly goes to a random player and shoots them i believe it would be with Humanoid:Move() but i never tried it so help would be very appreciated thanks. Here is the boss picture (it seems more weighty than normal npcs)

5 Likes

Might want to look into pathfinding. A bit of random and you’ll have it.

1 Like

Where could i learn about path finding?

either on the documentation site on roblox or through youtube tutorials

1 Like

where could i have a base to start off?

For Pathfinding if u search on the toolbox zombie killer you will find a free model with a pathfinding script but thats not a good way to start scripting so i really would suggest watching a youtuber slowly script and explain parts of the scripts as they go on thats how i learned (whatever i have learnt so far lol)

1 Like
local pathfinding = game:GetService("PathfindingService")

local human = script.Parent:WaitForChild("Humanoid")

local torso = script.Parent:WaitForChild("Torso")

local path = pathfinding:CreatePath()
path:ComputeAsync(torso.Position, game.Workspace.A.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(game.Workspace.A.Position)

here is what i came up with in a tutorial, how would i make the ai follow a random player in the server now? also is it possible to stop him while he is walking?

im sorry but i cant answer that from the top of my head bc im not an expert but i can assure you that if u search up tutorials you can find hundreds of them to help you through ur scripting experience

1 Like