Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I stop this door from being removed from the game?

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!

2 answers

✓ Accepted answer
script.Parent.Anchored = true

it might be you not setting the Transparency back to 0, too.

5 comments

0

Are you sayinig it was not anchored in the first place?

0

You know what you might be right lol.

0

I never checked about the anchoring

0

You were right thank you so much!

0

No problem :)

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.