Basicly my game is filtering enabled and this script is a Local Script inside of a gui button and it works but not as I want because when I lock the door it gets locked for me but for the other people its like if the door was unlocked how do I do so that its locked for everyone without turning off my filter
function onButtonClicked()
local x = game.Workspace:FindFirstChild("Home"..script.Parent.Parent.Parent.Parent.Name)
if not (x) then
return
else
if script.Parent.Text == "Lock Door" then
script.Parent.Text = "Unlock Door"
x.Home.FDoor.CanCollide = true
elseif script.Parent.Text == "Unlock Door" then
script.Parent.Text = "Lock Door"
x.Home.FDoor.CanCollide = false
end
end
end
script.Parent.MouseButton1Click:connect(onButtonClicked)

1 comment
Well FilteringEnabled is used to, block exploiters or prevent any changes to any Instance. So it's not best if you used FE for something you can actually change without converting it into FE if you're not planning to do so.