hi so im just trying to pass a parameter into a coroutine, the script looks like this:
local co = coroutine.create(function(value)
print(value)
end)
for i,v in pairs(stuffInRegion) do
if v.Parent:FindFirstChildWhichIsA("VehicleSeat") then
coroutine.resume(co)(v)
end
end
So im basically trying to pass v so i could use it in the coroutine, but i get this weird error:
You are getting this error because coroutine.resume returns a Boolean indicating if the resumption was successful or not. You can pass parameters to the coroutine by passing arguments through coroutine.resume.