Hey everyone I was wondering would it be possible to make a owner only door that’s impossible to noclip through if it is how would I make it?
Yes but you will need a script
for it to work
What would the script be that I would require
print("VIP Door Script loaded")
-- list of account names allowed to go through the door.
permission = {"USERNAME HERE"}--Put your friends name's here. You can add more.
function checkOkToLetIn(name)
for i = 1,#permission do
if (string.upper(name) == string.upper(permission[i])) then return true end
end
return false
end
local Door = script.Parent
function onTouched(hit)
print("Door Hit")
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
-- a human has touched this door!
print("Human touched door")
-- test the human's name against the permission list
if (checkOkToLetIn(human.Parent.Name)) then
print("Human passed test")
Door.Transparency = 0.7
Door.CanCollide = false
wait(1) -- this is how long the door is open
Door.CanCollide = true
Door.Transparency = 0
else human.Health= 0 -- delete this line of you want a non-killing VIP door
end
end
end
script.Parent.Touched:connect(onTouched)
You can try to make something like this but serious exploiters(not people just glitching) can always get through. One method you can use to do this is to check on the server if the player’s location is within the room your blocking with the door. One simple way to stop glitchers is to locally place a block within the room.
So even if there is someone nocliping they still won’t be able to get through?
yes because it would kill them if there not the creator
just make sure to put thick borders around owner room
But what script would I need to acquire to make that function correctly
I am coding this on my phone so there might be typos. This is the code for a local box.
local box = workspace.box
local players = game:getService(“Players”)
local player = players.LocalPlayer
local ownerId = 0000000
local function removeBox()
box.CanCollide = false
end
if player.UserId == ownerId then
removeBox()
end
I wrote than on my phone so I am sure there are typos. This would be a script that goes in starter player scripts.
But a hacker can just noclip through it right?
I’ve seen a friend who used a script to where if someone were to noclip through a certain area it would immediately teleport them to spawn or outside the building they were trying to noclip through
This isn’t true. People who are no clipping don’t count for the hit event(most of the time). They can also teleport.
Written on mobile so not indentation
Something you can do(not as a door but as a checker on the server)
local ownerName = “owner”
local box = script.Parent
while true do
local touching = box:GetTouchingParts()
for i, p in pairs(touching) do
local human = p.Parent:FindFirstChild(“Humanoid”)
if human and human.Parent.Name ~= ownerName then
human.Health = 0
end
end
wait(1)
end
This is just an example I wrote quickly. It’s bad in a lot of ways but it will work.
Ok so box needs to be a part that fills up the whole room?
And would it be more effective to do this using location or something I’m not sure
You can also use a Region3 (i think thats what its called) and kick the player if they get inside it while having an owner only door
so how would i go about doing that because it seems the most efficient way to do it?
Im not sure. You’ll have to ask around.