I am making a door where only the group owner can make the door open and close. I want the door to be OnClicked and not OnTouched. How can I also make it so that when I click the door again, the door closes and goes back to Transparency = 1 CanCollide = true?
GroupId = 3348123
script.Parent.Touched:connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr:IsInGroup(GroupId) then
script.Parent.Transparency = 1
script.Parent.CanCollide = false
end
end)
Please help me, thank you!

1 comment
Are you using a brick or a gui?