I’m currently working on a cafe game for Roblox. As you know in cafe games there is an invisible wall that only employees can go through that seperates the kitchen from the rest of the cafe. I don’t know how to script or make this, I’ve tried searching for youtube tutorials but I haven’t found any. Please help.
So you would need to check if the player is in the group and un-cancollide the door, in a localscript
local door = game.Workspace.door --Change this if you want
local groupId = 1 --Change this to the group
local player = game.Players.LocalPlayer
if player:IsInGroup(groupId) then
door.CanCollide = false
end
You can also make multiple doors
local doors = {game.Workspace.door1, game.Workspace.door2} --Change this if you want
local groupId = 1 --Change this to the group
local player = game.Players.LocalPlayer
if player:IsInGroup(groupId) then
for index, door in pairs(doors) do
door.CanCollide = false
end
end
local door = game.Workspace.door --Change this if you want
local groupId = 1 --Change this to the group
local minimumRank = 20 -- Change this
local player = game.Players.LocalPlayer
if player:GetRankInGroup(groupId) >= minimumRank then
door.CanCollide = false
end