I have a problem were I have a invisible door that goes into a room with a click-to-give uniform. The camera can go through the door, even with the group-only door script. I want the door to remain transparency 1 but make it so the camera can't go through it, any ideas? Door script I use is below on a transparency 1 part.
local rank = 47 -- The rank the player will need to get through (out of 255)
local groupID = 4957909 -- The group ID the player must be in
script.Parent.Touched:connect(function(hit)
if (hit and hit.Parent and game.Players:FindFirstChild(hit.Parent.Name)) then
if (game.Players[hit.Parent.Name]:IsInGroup(groupID) and game.Players[hit.Parent.Name]:GetRankInGroup(groupID) >= rank) then
script.Parent.CanCollide = false
script.Parent.Transparency = 1
wait(1)
script.Parent.CanCollide = true
script.Parent.Transparency = 1
else
script.Parent.CanCollide = true
end
end
end)

4 comments
Is CanCollide off for the door? Make sure it's toggled ON, on ALL parts associated with the door model.
@BryanFehr CanColide is set to true and you can still leak the camera through the door.
If the door is set higher than 0.2 transparency, the camera can go through the door. Anything less than 0.2 transparency will make it so that the camera cannot go through it. I want the brick to have 1 transparency at all times without the camera going through it.
So if your gonna do this, make sure you duplicated the part, insert a normal mesh in it and set it's scale all to 0, and you're done. Use it on your main part as its easier.