Hello so i’m working on a door system that gets every instance in the folder and then whenever you use a keycard it opens it
I ran into a issue where it doesnt change the doors postion
function open()
print("Bruh")
for i = 1,60,1 do
door.Position = Vector3.new(door.Position.X, door.Position.Y + 0.1, door.Position.Z)
wait()
end
wait(3)
close()
openv.Value = false
end
local TS = game.TweenService
function Doorfunc(open: boolean)
if open == true then
TS:Create(door, TweenInfo.new(2), {CFrame = door.CFrame * CFrame.new(0,6,0)}):Play()
else
TS:Create(door, TweenInfo.new(2), {CFrame = door.CFrame * CFrame.new(0,-6,0)}):Play()
end
end
Doorfunc(true) -- Opens door
Is the door a model or a part?
If the door is a model, I suggest you make a main part of the door and weld all other parts to it, then tween the main part.