Hi there! I'm looking for a script that will perform the following functions if anyone could please help me out:
• A brick that can be clicked with your mouse. The default position is that CanCollide is true. After clicking, CanCollide is false. The brick can be clicked again to make it CanCollide true again. • Only the people with the group id's of 2534270 (BUT, the "Suspended" rank in this group CANNOT open this door) and 2533427. No one else can open the door. • When CanCollide is true, the brick is not transparent. When CanCollide is false, the brick is transparent partially.
I'm not at all good when it comes to scripting so my requests in the future will be very basic lol. Thanks in advance to those that respond! :)
-Terence
make sure click detector is in the door, as well as a script. (edited) try it now.
local groupId = 2534270 local suspended = 000 - - change to the RANK of the ROLE you don’t want to click. script.Parent.ClickDetector.MouseClick:Connect(function(plr) —plr who clicked if plr:GetRankInGroup(groupId) ~= suspended then if script.Parent.CanCollide == true and script.Parent.Transparency ~= 0.5 then script.Parent.CanCollide = false script.Parent.Transparency = 0.5 elseif script.Parent.CanCollide == false and script.Parent.Transparency ~= 0 then script.Parent.CanCollide = true script.Parent.Transparency = 0 end end end)