I'm making a game on ROBLOX and I made a house. I'm trying to script the door so it can function or work but I only know the basics of scripting and I'm bad a scripting. I made a script and it works but after a while it just stops working or not function. I'm very bad at coding so it's not a surprise to me that it doesn't work. I checked the output section and it says that one of my variables is not working but I don't know what to do and I get very confused on what to do. I tried multiple attempts to make the script work but it just failed. Can you please help me fix the script?
If you'd like to see the script here it is:
local DoorA = game.Workspace.DoorModel.DoorA.DoorA
local DoorB = game.Lighting.DoorHolder_MODEL.DoorB.DoorB
local DoorHolder = game.Lighting.DoorHolder_MODEL
local DoorModel = game.Workspace.DoorModel
function onClick(click)
DoorA.Parent = DoorHolder.DoorA
DoorB.Parent = DoorModel.DoorB
end
script.Parent.MouseClick:Connect(onClick)
I know it's bad but it's the best I could do...

2 comments
I might be able to help you if you show me the code.
Okay, Sorry for the late respsonse