So heres my code
local G = 2695224 local R = 3 function onTouched(player) if player ~= nil and player:IsInGroup(G) and player:GetRankInGroup(G) >= 3 then end end
And what do I put to make it so some players can walk through a wall but others can't. It has something to do with Current Camera.
Try to make a script that is like the example on this link:
Then, put that script in ServerStorage. Then, make your group script clone the script and put the clone in the player's backpack.
I made this script as if what you try to do is to make someone able to pass through an object, a door.
permission = {"Player1"}-- list of account names allowed to go through the door. need to be the correct name (If the name is Hello, and you write 'hello' it wont allow him. function checkOkToLetIn(name) for i = 1,#permission do if (string.upper(name) == string.upper(permission[i])) then return true end end return false end local Door = script.Parent function onTouched(hit) print("Door Hit") local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then print("Human touched door") if (checkOkToLetIn(human.Parent.Name)) then print("Human passed test") Door.Transparency = 0.8 Door.CanCollide = false wait(3.0) --this is how long it will be in CanCollide false Door.CanCollide = true Door.Transparency = 0 else end end end script.Parent.Touched:connect(onTouched)
That one was to make specific person to get through.
You have to put the script inside the "door".