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

button door script not working?

door=script.Parent.Parent.trapdoor
function onCicked()
door.Transparency=0.6
door.CanCollide=false
wait(2)
door.Transparency=0
door.CanCollide=true

end
script.Parent.ClickDetector.MouseClick:connect(onClicked) --this my script, i do not know why it does not work

door = script.Parent.Parent.Door
 function onClicked()
 	door.Transparency = 1
        door.CanCollide = false
        wait(2)
        door.Transparency = 0.3
        door.CanCollide = true
end
 
 script.Parent.ClickDetector.MouseClick:connect(onClicked)--this is a random scipt i found,and it works

these scripts are very much alike but i do not know why mine does not work

1 answer

Check the position of "trapdoor".

Is it in the Workspace or somewhere else?

Edit: Replace door=script.Parent.Parent.trapdoor with door = game.Workspace.trapdoor

2 comments

0

It is in workspace, I think the problem could be that maybe I put "trapdoor" in capital in the workspace but I did not capitalize it in the script

0

well i figured out the problem, i spelled click wrong, i put cick

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