I was testing my code, and for some reason, my coroutine can't obtain a player as a parameter. This is the part of my script:
local rotCor = coroutine.create(self.setRotation)
print("Sending:",targetPlayer)
coroutine.resume(rotCor,targetPlayer)
function Properties:setRotation(targetPlayer)
print("Received:",targetPlayer)
--Blah blah blah
end
When I execute my code, this is the output:
Sending: SnyFort
Received: nil
Is It a normal behavior of a coroutine? This code is within a Module script executed in a LocalScript.
I'm using coroutines because I don't want the function to interrupt the rest of the code, so if you know any alternative, I'd like to try It.
Thanks.
