Door not working properly for models, am I doing something wrong?
So I have a good working script for a union or a part, but for some reason it doesnt work for models what am I doing wrong?
d = false
function onClicked()
if d == false then
d = true
02 | script.Parent.CFrame = script.Parent.CFrame * CFrame.new( 0 , 0 , 0.244 ) * CFrame.fromEulerAnglesXYZ( 0 , 0 , 0 ) |
07 | script.Parent.CFrame = script.Parent.CFrame * CFrame.new( 0 , 0 , - 0.244 ) * CFrame.fromEulerAnglesXYZ( 0 , 0 , 0 ) |
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)