Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Group rank door script?

Asked by
F_lipe 135
9 years ago

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.

0
I did just notice I think I forgot to connect my functions. F_lipe 135 — 9y

1 answer

Log in to vote
0
Answered by
Troidit 253 Moderation Voter
8 years ago

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?

Ad

Answer this question