Hello! I am assuming you are fairly new to scripting and would like some help. This tutorial will show you how to make a simple door in ROBLOX Studio using LUA Scripting. It shall take about 10 minutes at most, and 5 at least
Firstly, you would want to create two parts in Roblox Studio. Make sure you have the "Explorer" And "Properties" tab open. You can find these tabs in the "View" tab at the top of Roblox Studio. Rename One of the parts "Door" and the other one "DoorButton" (Make sure that the Capitilization is exactly like that)
The second thing you want to do is right click on "DoorButton" in the explorer tab and hover your mouse over "Insert Object"
Whilst hovering over "Insert Object" a menu should appear with alot of different things you can put in your part, Find and click on "ClickDetector"
Find "ServerScriptService" in the Explorer and right click on it, hover over it and insert "Script" Double click on the script that appears in the ServerScriptService and Write get rid of "Print("Hello World!")
Write this in the script:
local Door = game.Workspace.Door
local button = game.Workspace.DoorButton
Door.CanCollide = true Door.Transparency = 0 function dooropen(button) Door.Transparency = 0.8 Door.CanCollide = false end game.Workspace.DoorButton.ClickDetector.MouseClick:Connect(dooropen)
Tada! You now have a working door.
Easy Written By R_ossi
See R_ossi's profile on Roblox