Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you Script a Click Open Door?

Asked by
SirPaco 66
9 years ago

How do you script a click open door? The door I am asking how to script is an Individual Part that you can manually open and close by clicking it. When the door opens CanColide is disabled and Transparency is enabled.

1 answer

Log in to vote
2
Answered by
Kurieita 125
9 years ago

What you're asking for is very simple. This isn't a request site, but first you should read up on the following.

-ClickDetectors. ClickDetectors

-Parts and properties (Transparency and CanColide)

It isn't hard to look things up for once.

local IsOpen = false
local Part = Instance.new("Part", Workspace)
local ClickDetector = Instance.new("ClickDetector", Part)

clickDetector.MouseClick:connect(function(Player))
  Part.Transparency = IsOpen and 1 or 0
  Part.CanColide = not IsOpen
end)

Accept and thumb up please :)

0
Did now work. Also, it is not inside the ROBLOX Wiki. SirPaco 66 — 9y
Ad

Answer this question