How to make AI to animatronics

I’m remaking fnaf 1, and had question. How to make AI for animatronics. Example:


He stands in this position.
Im want he moves in poses im did for him

How do i’m make this?

1 Like

FNAF 1’s AI works on random numbers and certain scenarios (camera up, doors down, etc.) to check if an animatronic can move to a position. Once the check is passed, the animatronic simply teleports to that location. You could script this the same way, and simply pose them when they teleport using animations.

1 Like

Thank you! I will definitely do so! I didn’t even think about checking.

I’m did the script but Bonnie won’t moving

chance = 0
while wait(2) do
	if game.Workspace.Cameras["1A"].Checking == false then
		script.Parent:MoveTo(game.Workspace.BonnieWaypoints.W1.Position)
	end	
	chance = math.random(0,100)
	wait(60)
	script.Parent:MoveTo(game.Workspace.BonnieWaypoints.W1.Position)
	wait(math.random(30,60))
	script.Parent:MoveTo(game.Workspace.BonnieWaypoints.W2.Position)
	wait(math.random(10,chance))
	script.Parent:MoveTo(game.Workspace.BonnieWaypoints.W3.Position)
	if game.Workspace.Systems.System1.Door.LockedValue.Value == false then
		script.Parent:MoveTo(game.Workspace.BonnieWaypoints.W4.Position)
	else
		script.Parent:MoveTo(game.Workspace.BonnieWaypoints.W5.Position)
		if game.Workspace.Systems.System1.Door.LockedValue.Value == false then
			script.Parent:MoveTo(game.Workspace.BonnieWaypoints.W4.Position)
		end
	end
end
1 Like

If you want the animatronics to teleport,use model:SetPrimaryPartCFrame(game.Workspace.BonnieWaypoints.W1.Position)
(model being the Bonnie model) rather than MoveTo.

1 Like

Thanks! I’m try this right now. Thank you so much for responding so quickly

And i’m noticed that need to use game.Workspace.BonnieWaypoints[“W1”].Position instead of (game.Workspace.BonnieWaypoints.W1.Position). Or no?

Sorry that was a mistake on my part, use game.Workspace.BonnieWaypoints[“W1”].CFrame.

1 Like

Anyway, thanks for the help! I’m going to test game

This is working. I’m found some mistakes in script and fixed it’s. And Bonnie moves. Thanks you so much for help!