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

How do I make a control panel? [closed]

Asked by 8 years ago

I'm building a prison and I want to make a control panel room that when you press the button it locks doors. I don't know how to script it. Please help.

Closed as Not Constructive by fireboltofdeath, Redbullusa, and NotSoNorm

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

3 answers

Log in to vote
2
Answered by 8 years ago

Insert a ClickDetector into the Part that is the button, then use this script. Insert this script into the Part that is the button.

Part = script.Parent -- defines the part
Door = PathToDoorHere -- defines the door you want to change

Part.ClickDetector.MouseClick:connect(function() -- start event when part is clicked
    if Door.CanCollide == true then -- if door is closed we open it
        Door.Transparency = 0.6 -- makes door partially transparent
        Door.CanCollide = false -- makes players able to walk through it

    elseif Door.CanCollide == false then -- if door is open we close it
        Door.Transparency = 0 -- makes door solid again
        Door.CanCollide = true -- makes players unable to walk through it again

    end
end)
0
This is not constructive. This player needs to learn how to script, instead of somebody giving them a big block of code.. My_Comment 95 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

Insert a click detector into the button, and when clicked make the doors transparent and can-collide. I am not giving you a script.

0
You shouldn't, not a request site. fireboltofdeath 635 — 8y
0
I know, that's why I'm not. My_Comment 95 — 8y
Log in to vote
-1
Answered by
Prioxis 673 Moderation Voter
8 years ago

Use clickdetectors just google them roblox has decent documentation on them