I’m working on a boat suspension script and I’ve ran across an error that I have never seen. Currently I am at a state where I’m completely confused on what to do, or what is causing this error to happen.
Module:
local Module = {}
Module.__index = Module
-- Services / Constants --
local RunService = game:GetService('RunService')
local _Boat = require(script.Parent)
----
-- Functions --
function Module.new(Model:Model)
local self = setmetatable({},Module)
self.Model = Model
self.Motors = {}
-- Function --
self:GetOperators()
---
self.Model.PrimaryPart:SetNetworkOwner(nil)
RunService.Heartbeat:Connect(function()
self:Update()
end)
---
return self
end
---
function Module:GetOperators()
-- For Statement --
for _,Operator in pairs(self.Model.Operators:GetChildren()) do
table.insert(self.Motors,_Boat.new(self.Model,Operator))
end
end
---
function Module:UpdateOperators()
-- For Statement --
for _,Operator in pairs(self.Motors) do
Operator:Update()
end
end
---
function Module:Update()
self:UpdateOperators()
end
----
return Module
Problematic Function:
function Module:UpdateOperators()
-- For Statement --
for _,Operator in pairs(self.Motors) do
Operator:Update()
end
end