I use to use this door for a old group game. but the script wont open the door and keeps popping out a error on me not sure what's going on here.
error is,
Workspace.Model.DOOR.Model.Door.Detector.detect:10: attempt to index field 'Character' (a nil value)
local distance = 14
local width = 6
local check = 0
local open = false
while true do
for k,v in pairs(game.Players:GetChildren()) do
if (script.Parent.Position - v.Character.Torso.Position).magnitude < distance then
check = check + 1
end
end
if check >= 1 then
if open == false then
open = true
for i = 0,width*2 do
for a,b in pairs(script.Parent.Parent:GetChildren()) do
if b.Name == "b1" then
b.CFrame = b.CFrame * CFrame.new(0,0,-0.5)
else if b.Name == "a1" then
b.CFrame = b.CFrame * CFrame.new(0.5,0,0)
else if b.Name == "c1" then
b.CFrame = b.CFrame * CFrame.new(0,0,0.5)
end
end
end
end
wait(0.05)
end
end
else if check == 0 then
if open == true then
open = false
for i = 0,width*2 do
for a,b in pairs(script.Parent.Parent:GetChildren()) do
if b.Name == "b1" then
b.CFrame = b.CFrame * CFrame.new(0,0,0.5)
else if b.Name == "a1" then
b.CFrame = b.CFrame * CFrame.new(-0.5,0,0)
else if b.Name == "c1" then
b.CFrame = b.CFrame * CFrame.new(0,0,-0.5)
end
end
end
end
wait()
end
end
end
end
check = 0
wait()
end

4 comments
Are you using R6 or R15 for players character type
useing r6.
oh wow, ok i just checked. the game settings i had it set to player choice. once i changed it to r6 it fixed my issue.
Okay, glad I could help good luck with you game :)