Easy Written By R_ossi

Creating a simple door Created on: 01-01-2019

This shows you how to make a door using LUA.

Introduction

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

Step One:

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)

Step Two:

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"



Step Three:

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!")

Step Four:

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)

Ending

Tada! You now have a working door.

Easy Written By R_ossi

See R_ossi's profile on Roblox

Discussion