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

How do you make a door that is connected to the surfaceGui?

Asked by 5 years ago

Right now I'm making a bed and it's up and I wanna have a like a tv screen controls that bed and gives an option to put down the bed or pull the bed back in its position how do you do it?

2 answers

Log in to vote
0
Answered by 5 years ago

Hi there! The solution you're looking for is to place a ClickDetector inside the part. The script, again inside the part, would look something like this:

script.Parent.ClickDetector.MouseClick:Connect(function()
--do stuff here
end)

the argument inside the event is the player who clicked the part, in case you were wondering :D

Ad
Log in to vote
0
Answered by 5 years ago

Create a SurfaceGui with your buttons. You will need to know how to script for this next part. Add a script wherever and connect the buttons using:

BUTTONLOCATION.MouseButton1Down:Connect(function()
    -- Code
end

Use that code attached to each button to do something. You can have it change the button color, text, run code on an external part, etc.

For extra assistance, please contact me on Discord.

Bark#4260

Answer this question