How would I change transparency and can collide for a player, like if I was making different zones and things only players who bought it could enter. I have tried putting the script in a local script, but this does not seem to work. Please help me with this!

3 comments

0

Can you post your attempt to do this? Also, what causes the player to be able to pass through a barrier? A gamepass, a certain item, what?, For a Server Script, try using Collision Groups: https://developer.roblox.com/articles/Collision-Filtering, Otherwise, make the function occur in a LocalScript with FilteringEnabled turned on

0

Since forced Filtering Enabled, this should be working. just make sure you use LocalScript (not script!), for example in StarterCharacterScripts. And dont forget to periodically check characters positions, and ban/kick all who should not be in restricted areas. Also use WaitForChild(), to make sure the part is loaded.

0

Have a server script check if the player has permission to cross the zone. If they do, clone a local script that removes the door part and set the parent to the player's character.