What do you want to achieve? Making a group rank locked door
What is the issue? The door won’t open and there’s no errors
What solutions have you tried so far? I looked on the developer forum but nothing seems to solve my problem
script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
if plr:GetRankInGroup(15934671) >= 11 then
script.Parent = false
wait(2)
script.Parent = true
end
end
end)
Add print statements after the event fires, as well as both of your if statements to see if the code is even running. Also, make sure the Group Id is correct.
script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
if plr:GetRankInGroup(15934671) >= 11 then
script.Parent.CanCollide = false
wait(2)
script.Parent.CanCollide = true
end
end
end)