How do you make a door controlled by a GUI?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    I would like to achieve making a door that is able to open and close using a GUI.

  2. What is the issue?
    The issue is I am a scripter in learning, and I have never learned about this. I can not find it anywhere else so I came here.

  3. What solutions have you tried so far?

I have only made a script that makes it to what I can only see. I don’t know if this could be a problem.

if game.Players.LocalPlayer.Name == "luqkyy" then 
 script.Parent.Enabled = true
else
 script.Parent.Enabled = false
end

I would love for people to message me or reply to this Forum. Another way you could contact me is through discord at luqkyy#0888. Thank you.

You could make a button in the GUI and when you press it, it opens the door
Local script inside button:

local button = script.Parent

button.MouseButton1Click:Connect(function()
   -- Open the door
end)
1 Like

If you want all players to go in and out the door, you will need a normal Script in addition to the LocalScript. See RemoteEvents at RemoteEvent | Documentation - Roblox Creator Hub.
The Roblox Developer Hub is a great resource to improve your abilities as a scripter @Lucastrapp. Good luck with your door!

2 Likes

Thank you so much! :smile: I will try this out immediately!

How do i make a door contact sensor like the ones in real life alarm systems so something happens when the door opens