local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")

local GameFunctions = ReplicatedStorage:WaitForChild("GameFunctions")
local AnimatronicsFldr = GameFunctions:WaitForChild("Animatronics")

local AnimatronicsPositions = workspace:WaitForChild("AnimatronicsPositions")

local Animatronics = {
    Freddy = AnimatronicsFldr:FindFirstChild("Freddy"),
    Bonnie = AnimatronicsFldr:FindFirstChild("Bonnie"),
    Chica = AnimatronicsFldr:FindFirstChild("Chica"),
    Foxy = AnimatronicsFldr:FindFirstChild("Foxy"),
    GoldenBear = AnimatronicsFldr:FindFirstChild("Golden Bear")
}

--[[
    PURPOSE: Creating new instances easier through the script itself so the game won't act out all weird when testing.
             and for convinences' sake
--]]
local function Create(Instance, Name, Parent)
    local NewInstance = instance.new(Instance)
    NewInstance.Name = tostring(Name)
    NewInstance.Parent = Parent
    
    return NewInstance
end

--[[
    PURPOSE: Initializes the Animatronics' movement, also uses the helper function in case of failure/for special animatronics.
--]]
local function AnimatronicMoveHelper(Animatronic, Position, debuged) -- Helps the main move function if an animatronic fails to move or it's a special one.
    
end

local function AnimatronicMove(Animatronic, Position, debuged) -- Main move function
    debuged = false
    local debounce = false
    
    if debuged then
        AnimatronicMoveHelper()
    end
    
    Animatronic = Animatronic[Animatronic]
end

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: