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!
COMMUNITY QUESTION
How would I change transparency and can collide for just a player?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
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
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.
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.