–Paste ALL of it, including this. It won’t mess up the script. You can remove this later on.
– Create a Part in Workspace called “RankDoor” or whatever you want, just change the “RankDoor” in the script if you change it.
– This is a LOCAL SCRIPT.
– Place this script in Starterpack, if it doesn’t work, tell me. -Frumpytrain914
local player = game.Players.LocalPlayer
local debounce = true
workspace.RankDoor.Touched:Connect(function() – If you want to change the part name, do it, but
don’t forget to change it here too!
if debounce == true then
if player:GetRankInGroup(5179062) >=1 then – The Group ID has already been put in, change the 1
to the minimum rank value.
– If you want it for just one value, remove the >.
debounce = false
print(“Success”) – Removeable
workspace.RankDoor.CanCollide = false
workspace.RankDoor.Transparency = 1 – Can change
wait(0.17)
workspace.RankDoor.Transparency = 0.8 – Can change
workspace.RankDoor.CanCollide = true
debounce = true
else
debounce = false
print("Player not high enough rank.") -- Removeable
wait(2)
debounce = true
end
end
end)