Okay so I need a part to open when a player that's in a certain group and is a certain rank and above in the group. This is what I have so far:
door = script.Parent
function Open()
door = script.Parent
door.CanCollide = false
end
function Close()
door = script.Parent
door.CanCollide = true
end
local player = get_player(part)
if not player then return end
local allow = (
player:IsInGroup(1157252) and player:GetRankInGroup(1157252) >= 4)
if allow then
Open()
delay(2, Close)
end
I have no idea what the error is if you could help I'd really appreciate it.

1 comment
I did just notice I think I forgot to connect my functions.