Here is the simplified version of the script that was used to solve the error.
local Players = game:GetService("Players")
local Boat1 = {}
local Boat2 = {}
local Boat3 = {}
-- Touch Event Was Here
table.insert(Boat1, #Boat1 + 1) --Player) -- Commented The Player Bit To Prevent Error.
-- Touch Event Was Here
table.insert(Boat2, #Boat2 + 1) --Player) -- Commented The Player Bit To Prevent Error.
-- Touch Event Was Here
table.insert(Boat3, #Boat3 + 1) --Player) -- Commented The Player Bit To Prevent Error.
Players.PlayerRemoving:Connect(function(Player)
for i = 1, #Boat1 do
if Boat1[i] == Player then
table.remove(Boat1, i)
warn(Player.Name..", Was Removed From Boat1 Because They've Left The Game!")
end
end
for i = 1, #Boat2 do
if Boat2[i] == Player then
table.remove(Boat2, i)
warn(Player.Name..", Was Removed From Boat2 Because They've Left The Game!")
end
end
for i = 1, #Boat3 do
if Boat3[i] == Player then
table.remove(Boat3, i)
warn(Player.Name..", Was Removed From Boat3 Because They've Left The Game!")
end
end
end)
But CleverSource’s solution also provides reference to how they can solve the issue…?
Also it is against Devforum Rules to give yourself a solution that just links to the actual solution, which is what you’ve done, I am not trying to be snarky or be a “mini-mod” here but I think he deserves the solution seeing as he provided it.