I’m trying to rotate a model inside a viewport frame. It works for one part of the script but doesn’t work for the other part even though they are pretty much the same.
I noticed when the script enters the while do loop it destroys all children.
This is the coroutine function. It works for the first image but doesn’t work for the second image. It destroys the children for when calling the function from the second image. (Not really destroys it just can’t detect the children. Maybe it is being destroyed it’s hard to tell.)
I am so confused right now so any help will be appreciated!
The thing is it’s an inventory system so multiple objects will rotate and this function will run many times. I could use the value thing that you said but just still use the coroutine.
That was my fault as I should’ve said it being an inventory system.