TOPIC - [Need help with scripting a Group Rank+ Door]
[What am I trying to archieve?]
I am trying to like, if a Rank+ door. I just need a script when a rank+ that is assigned to the script in the group will be able to enter, I need the script that if a staff(Rank+ in the script) if they hit the part, it will let them enter it. But, I can only make ones like if the staff hit the part with the script, it gives some seconds to close it. (But all the ranks can enter while it’s open.)
If you can do this, please don’t hesitate to reply too, if you have reply I’ll be looking on that soon/tommorow.
3 Likes
This is a simple script.
All you need to do is insert a local script into somewhere like StarterCharacterScripts and type something like this:
local GroupId = 0 -- group id
local Player = game.Players.LocalPlayer
local MinRank = 0 -- Minimum rank to be let in
local Door = workspace:WaitForChild('Door') -- change to the location of the barrier that stops people entering
if Player:GetRankInGroup(GroupId) >= MinRank then
Door:Destroy()
end
Since this is a local script, the door will exist for every player that doesn’t meet the necessary rank. But it will be destroyed for the players that have or are above the required rank.
8 Likes