Problem with CollisionGroupSetCollidable

There is a task, it is necessary to make an impassable area for players different from the one that was inside the part. That is, if one entered, then he can be there, and others cannot enter.

It would seem to be the simplest task! We make a part of touch, a part of a limiter. And we set group collisions… And… It works every other time.

I made a Part that changes the CollisonGroup with the server after 10 seconds. On the client side, it becomes passable or is blocked after a random time, or does not react at all to the change of the collision group. At the same time, the change of the collision group occurs.

Red part:
CollisionProblem.rbxl (56,6 КБ)

Expected behavior

It is expected that when changing a group, the client will see a change in the collision of Part immediately after the change in the collision group.

Thanks for the report! It looks to me like in the Main script, the collision group of the block is indeed set, and the collisions between table and Player are being disabled and enabled. However, it seems like the actual player is never assigned to the Player collision group, and so these changes have no effect. Can you try to add the code which assigns all of the player parts to the collision group Player (you can find that here: Collisions | Documentation - Roblox Creator Hub, just need to specify your specific collision group name) and see if that fixes the issue?

I added the script from the link. It almost helped. But, as you can see in the video, the collision is enabled only after the second collision.

CollisionProblem.rbxl (57,8 КБ)

Interesting - the new rbxl seems to be working correctly for me. Can you confirm which version of Studio you are running and on what platform? Thanks!

Windows 10

Thanks! This is weird. Can you try out this experience? It should be essentially the same as yours, but I just want to rule out that something funky isnt going on in the repro.
CollisionSanityCheck.rbxl (55.4 KB)

At the first launch everything worked as it should and I even started writing a response. But I decided to try to launch it again. And then the miracles began. I let it in and out as I wanted.

I decided to record a video and launched the project - everything worked correctly, then I, without stopping the video, restarted the Studio and… I got exactly the option that it works from the second collision.

Thank you for checking! I have finally been able to get the behavior to reproduce locally. We will now work on a fix, and keep you posted.