I was trying to make it so that when a player clicks a button the door changes its x position so that players can get through the door.
function onClicked()
script.Parent.Parent.Part.Size.X = script.Parent.Parent.Part.Size.X - 5
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

2 comments
What's the error? Did you mean to make it position not Size.X
No, I meant Size x. And the error is "X can not be assigned to"