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

Clickable door so only a certain rank in a group can open it?

1 answer

In short, make an event that triggers a function for an if statement to check if the person that clicked it is a certain rank to open it. Here is just an idea of how you can do it.:

game.Workspace.Part.ClickDetector.MouseClick:Connect(function(player)

	if player.Rank == "Master" then
		game.Workspace.Part.Transparency=1
		game.Workspace.Part.CanCollide= false
		wait(3)
		game.Workspace.Part.Transparency=0
		game.Workspace.Part.CanCollide= true
	end
end

player.Rank references a string value put inside that determines the rank of the player (or at least that's how I would do it).

Instead of the door turning invisible and letting you go, you can put an animation instead, but that's something else you're going to have to research, as every scripter does to learn :).

I hope this helps, and happy scripting!

Cheers, Cyroxite.

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