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

Door not opening?

So I'm trying to make an admin only door, and it's not working? The problem is the Door won't open when I click it. Here's the Script:


local Admins = {"Player", "Player1", "The_Voids"}





function onClicked(playerWhoClicked)
	if Admins[player.Name].MouseClick:connect then
    script.Parent.CanCollide = false
	script.Parent.Transparency = 0.5
	wait(5)
	script.Parent.CanCollide = true
	script.Parent.Transparency = 0
end
 
script.Parent.ClickDetector.MouseClick:connect(onClicked)


1 comment

0

The problem is line 8. Here's a link that may help you, http://wiki.roblox.com/index.php?title=Table

1 answer

Also the "if" statement should be "ended". Basically add an "end" at line 15.

1 comment

0

True, but the way he used the if statement is all wrong.

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