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

How do u do so you click a door and then it open and closes each time you click?

Put script in Awnser plz.

1 comment

0

I mean by a swivel door so it swivels around!

2 answers

Here's a simple script that opens and closes when clicked. Insert the script and a ClickDetector into the door part. Modify the script to your liking. EDIT: I didn't see your comment, remove the CanCollide and Transparency lines and change them to rotate the door. Use this page on the wiki for help: http://wiki.roblox.com/index.php?title=CFrame

door = script.Parent
open = false

door.ClickDetector.MouseClick:connect(function()
	if(open == false) then
		door.CanCollide = false
		door.Transparency = 0.5
		open = true
	elseif(open == true) then
		door.CanCollide = true
		door.Transparency = 0
		open = false
	end
end)

2 comments

0

Thanks thats perfect!

0

You're welcome!

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