Roblox Tutorial - Make your own door commands Source Code

Server Script Service:

local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Prefix = "/"
local OpenDoorCommand = "open"
local CloseDoorCommand = "close"

local GroupId = 10392184
local MinRank = 2

local function Notification(text, player)
	ReplicatedStorage.Message:FireClient(player, text)
end

local function AnimateDoor(Door, Transparency, CanCollide, player)
	local DoorInstance = game.Workspace.Doors:FindFirstChild(Door)
	if DoorInstance then 
		TweenService:Create(DoorInstance, TweenInfo.new(2.5), {Transparency=Transparency}):Play()
		DoorInstance.CanCollide = CanCollide
	else
		Notification("Door doesn't exist!", player)
	end
end

local function PerformAction(Action, Door, Player)
	if Action == "Open" then 
		AnimateDoor(Door, 1, false, Player)
	else
		AnimateDoor(Door, 0, true, Player)
	end
end

game.Players.PlayerAdded:Connect(function(Player)
	Player.Chatted:Connect(function(msg)
		if Player:GetRankInGroup(GroupId) >= MinRank then 
			local LowerCaseMessage = string.lower(msg)
			if string.find(LowerCaseMessage, Prefix.. OpenDoorCommand) then
				local SplitMessage = string.split(msg, " ")
				local DoorToOpen = SplitMessage[2]
				PerformAction("Open", DoorToOpen, Player)
			end
			if string.find(LowerCaseMessage, Prefix.. CloseDoorCommand) then
				local SplitMessage = string.split(msg, " ")
				local DoorToOpen = SplitMessage[2]
				PerformAction("Close", DoorToOpen, Player)
			end
		end
	end)
end)

Local script:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StarterGui = game:GetService("StarterGui")


ReplicatedStorage.Message.OnClientEvent:Connect(function(text)
	StarterGui:SetCore("SendNotification", {
		Title = "Notification",
		Text = text, 
		Duration = 3
	})
end)

For any scripting support make a #scripting-support post!