[HELP] How would I go about making this?

Hi Robloxians!

I was playing a game on Roblox it had a gate where players who were a certain rank or higher could walk through this gate SMOOTHLY (it appeared to have no onTouch, teleporting system, or lag while moving through the block). It was as if there was no block there at all for the people who were the certain rank or above, and it was there for the people who were under the rank.

I want to know how I would go about making this. Is there a property of the player or the block that allows certain players to pass through, or is this a complex bit of code?

Thanks,
R0bl0x10501050

P.S. I’m assuming this is the right category… correct me if I’m wrong.

1 Like

Use a localscript a to set the cancollide property of the gate differently for players.

1 Like

It probably used magnitude, which get’s the length of 2 vectors and used TweenService to move the gate. There is a property in parts called CanCollide, which determines if something should pass through it or not.

1 Like

Yeah, I believe it’s just collision filtering with an aesthetic Tweening for the style. PS: use a server script and not a local script if you don’t want exploiters to mess with the ranking system.

1 Like

Thanks everyone! I’ll try to use the Collision Filtering service to make it.

Lol i read the first bit and finally realized what Collision Groups are…

Btw, what collision group is the player in? Default?

Yeah it’s default, to change it there is an example script somewhere in the dev api tutorial

1 Like

Thanks for your help! Much appreciated!

Sorry, last question, but how does it prevent the people under the required rank from passing through?

Well it prevents the people under the required rank by making them collide with the door and unable to pass through. Here is some psuedo code.

On player join:
if rank == owner then

collisiongroup of that player is set to owner which can pass
through certain doors

end
1 Like