Hi, I've made a script to open a Door by decreasing the size of the door, the only problem is I can't seem to control from where the size is decreasing. Every-time it decreases, it's from the top and bottom and decreasing to the center instead of decreasing from and to just 1 direction.
here is the Code:
local MDoor = script.Parent
local handle = script.Parent.Parent.Handle
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if msg == "Open Door" then
repeat
MDoor.Size = MDoor.Size - Vector3.new(0, 1, 0)
handle.Position = handle.Position - Vector3.new(0, 1, 0)
wait(0.4)
until
MDoor.Size == Vector3.new(36, 1, 2)
and handle.Position == Vector3.new(1406, 16, 644.5)
end
end)
end)
Thanks.

2 comments
Thanks, would you be able to give an example of how the Resize works? The wiki didn't give a way of how to use it.
MDoor:Resize(Enum.NormalId.Top,-1)