Body type doesn't change (send help)

I’m gonna call 911 now. So, there it is. I create an object:

greenPlatforms[i] = display.newRect(..........)

then I create another object under previous and connect them that way:

effectBox.greenParent = greenPlatforms[i]

Then in collision event I have this:

event.object1.greenParent.bodyType = "dynamic"

I thought that I’m the best and everything is fine, but nothing has changed after collison event. Then I add this right after previous string:

print(event.object1.greenParent.bodyType)

and I saw “static”. If u need I can send more info. Help)))

https://docs.coronalabs.com/api/type/Body/bodyType.html#gotchas

do this:

timer.performWithDelay(1, function() event.object1.greenParent.bodyType = "dynamic" end )

Oh thanks! I cancel my call to the police. I didn’t notice that thing in docs.

https://docs.coronalabs.com/api/type/Body/bodyType.html#gotchas

do this:

timer.performWithDelay(1, function() event.object1.greenParent.bodyType = "dynamic" end )

Oh thanks! I cancel my call to the police. I didn’t notice that thing in docs.