So when I set the CanCollide to false and the transparency to 1 on a tycoon door I have, the tycoon door is removed from the game after maybe two seconds. When I don't the script runs fine. I really don't want the door removed from the game. Why is this happening and how can I fix it? Is it garbage collection maybe? I don't know. Anyway all I am doing is this:
script.Parent.CanCollide = false script.Parent.Transparency = 1
No other code is the problem because I tested it without these to lines and it worked like a charm. Please help me out if you can. Thanks!
script.Parent.Anchored = true
it might be you not setting the Transparency back to 0, too.
If the door is not anchored then the problem is most likely that it's falling through the floor and being collected by the debris service. So, in a way, you could think of it as being "garbage collected" by ROBLOX's physics engine since it no longer has to compute collisions on the part, and it's not locked in place from being anchored.
A simple fix would be to anchor the part.