It works in playtest but not online. I'm not sure what's wrong and output tells me nothing.
bin = script.Parent function onButton1Down(mouse) local hit = mouse.Target if (hit == nil) then return end if (hit.Name == "SilverDoor2") then hit.Transparency = 0.8 hit.CanCollide = false wait(2) hit.CanCollide = true hit.Transparency = 0 end end function onSelected(mouse) print("Action Tool Selected") mouse.Button1Down:connect(function() onButton1Down(mouse) end) end bin.Selected:connect(onSelected)
Add wait()
to the beginning of the script. Scripts that run locally or are based on client-sided objects should be careful to wait that everything has loaded, and for hopperbins this usually fixes it.
go here it will help you:
http://wiki.roblox.com/index.php?title=Special%3ASearch&search=key+door&go=Go