You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Make players move with a moving part.
-
What is the issue?
-
What solutions have you tried so far? Youtube.
for count=1,#charactersTouching do
if charactersTouching[count][1] == character then
for i=1,#charactersTouching[count]-1 do
if charactersTouching[count] [i+1] == object then -- error line
if i == 1 then
table.remove(charactersTouching, count)
else
table.remove(charactersTouching[count], i+1)
end
end
end
end
end
end