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

How do I get certain people to go through a door?

How do I get certain people to go through a door? Is there like a script for it? Something like a VIP door but just with 3 certain people . . . Please help , thanks.

1 answer

Make sure you put this script inside the door.If this doesn't work I'll fix it.

CertainPeople = {"Bob","Kozero","CertainPerson"} -- change this to the name of the person the personal door belongs to
door=script.Parent


function onTouched(hit)
	local character = hit.Parent
	if character:FindFirstChild("Humanoid") then
		for i,v in pairs(CertainPeople) do
		if v == character.Name then
			door.CanCollide = false
			door.Transparency = 0.5
			wait(4) -- You can change the number to the amount of seconds you want the door to be open
			door.CanCollide = true
			door.Transparency = 0
		else
			character:BreakJoints() -- remove this line if you want a non-killing door
		end
	end
	end
	end

script.Parent.Touched:connect(onTouched)

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