I would like this script so only people in a certain group and/or team can click this, but not everyone that's in the game, but I can't seem to figure it out. I'm drawing a blank. xD
Door = script.Parent.Parent.Door function onClicked() Door.Transparency = 1 Door.CanCollide = false end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Well, from the MouseClick function, you can get the Player.
Door = script.Parent.Parent.Door id = 1337 -- Group Id open = false script.Parent.ClickDetector.MouseClick:connect(function(p) if p:IsInGroup(id) and p.TeamColor == BrickColor.new("Really red") then -- BrickColor of the TeamColor if open == false then Door.Transparency = 1 Door.CanCollide = false open = true elseif open == true then Door.Transparency = 0 Door.CanCollide = true open = false end end end)