Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Group rank door script?

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

0

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

1 answer

On line 12 you HAVE local player = get_player(part) but where's the function get_player(part)?

You can't tell the script to preform a function if there's no function named that.

hope this helped?

This discussion is preserved as it was. New answers, comments, and votes are closed.