Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

can't make an automatically opening door for some reason?

Asked by 2 years ago

i tried to make a door which automatically opens, and so i made this script

local parent = game:GetService("Workspace").Model
local mag = 3
local char = game:GetService("Players").LocalPlayer
local otherpart = game:GetService("Workspace").Modeler
local prevpos = game:GetService("Workspace").Modelerer

if (parent.Position - char.Character.HumanoidRootPart.Position).magnitude < mag then
    for i = 1 , 2, 0.01 do
        parent.CFrame = parent.CFrame:Lerp(otherpart, i)
    end 
else
    for i = 1 , 2, 0.01 do
        parent.CFrame = parent.CFrame:Lerp(prevpos, i)
    end 
end 

the thing is, it doesn't work help would be appreciated thx

0
I think you can use free model of automatic sliding door in toolbox and recreate it. oldmantv12345 9 — 2y

Answer this question