I've attempted to make a sliding door that changes position when clicked. I've soon to add the animation, as I wanted to make sure the door changed position. When I click the door, I receive nothing from the output. Any help would be appreciated, and any answers that work or help will be upvoted. Thank you.
--[[
DoorClosedPosition = 8.5, 5, -0.5
DoorOpenPosition = 13.5, 5, -0.5
--]]
partPos = script.Parent.Position
part = script.Parent
if partPos == Vector3(8.5, 5, -0.5) then
part.ClickDetector:MouseClick(function()
partPos = Vector3.new(13.5, 5, -0.5)
end)
else
part.ClickDetector:MouseClick(function()
partPos = Vector3.new(8.5, 5, -0.5)
end)
end
