Im making a fnaf inspired game and i made four AIs so far but as im integrating and testing the second AI the first one blocks the second one.
what i mean is that unless the first AI is finished doing its thing only then will the second AI start. I want them to move asynchronously. thanks!
--// Services //--
local RS = game:GetService("ReplicatedStorage")
--// Variables //--
--Postitions--
local VentGuyPoints = RS:WaitForChild("VentGuyPoints")
local LeftGuyPoints = RS:WaitForChild("LeftGuyPoints")
local RightGuyPoints = RS:WaitForChild("RightGuyPoints")
--------------
--Folders--
local Hallucinations = RS:WaitForChild("Hallucinations")
-----------
--Stopers--
local Locker = workspace.Locker
local RightDoor = workspace.RightDoor
local LeftDoor = workspace.LeftDoor
-----------
--// Module scripts //--
local VentGuyBehavior = require(script.VentGuyAI)
local LeftGuyBehavior = require(script.LeftGuyAI)
local RightGuyBehavior = require(script.RightGuyAI)
local OfficeGuyBehavior = require(script.OfficeGuyAI)
--// Main Code //--
--Vent Guy--
local function initializeVentGuy(ventGuy)
print("vent guy executed")
local VentGuyAI = VentGuyBehavior.new(ventGuy, VentGuyPoints, Locker)
VentGuyAI:Run()
end
-- Initialize VentGuy
initializeVentGuy(Hallucinations.VentGuy:Clone())
------------
--Right Guy--
local function initializeRightGuy(rightGuy)
print("Right guy executed")
local RightGuyAI = RightGuyBehavior.new(rightGuy, RightGuyPoints, RightDoor)
RightGuyAI:Run()
end
-- Initialize RightGuy
initializeRightGuy(Hallucinations.RightGuy:Clone())
-------------
--Left Guy--
local function initializeLeftGuy(leftGuy)
end
-- Initialize LeftGuy
------------
--Office Guy--
local function initializeOfficeGuy(officeGuy)
end
-- Initialize OfficeGuy
--------------