I am basically trying to get a brick inside a model called Door1 to Rotate using a click detector, but I continuously mess up on the actual Function(For reasons I do not know). I don't know what the problem is; hopefully you guys can help me out.
function onClicked() script.Parent.Parent.Door1.Rotation=90, -0, 185
end script.Parent.ClickDetector.MouseClick:connect(onClicked)
The Rotation property is a Vector3 value.
function onClicked() script.Parent.Parent.Door1.Rotation = Vector3.new(90,0,185) script.Parent.ClickDetector.MouseClick:connect(onClicked)
Also, with rotation and moving parts and such there was something about CFrames... I kind of forgot, heh. You could do something like this -
script.Parent.Parent.Door1.CFrame = script.Parent.Parent.Door1.CFrame * CFrame.new(0,0,0) * CFrame.Angles(math.rad(90),0,math.rad(185))
I think it was that you would use that because if there are parts close to that part, the rotating part won't move out of the way, which was what would happen with Vector3.