I'm trying to make it where, when someone clicks a brick, the brick makes another brick turn. But the output is saying 'Rotation' isn't right and the actual rotation.
1 | function onClicked() |
2 | script.Parent.Rotation.new = { 0 , 3 , 3 } --the actual rotation. |
3 | end |
4 |
5 | script.Parent.ClickDetector.MouseClick:connect(onClicked) |
1 | function Clicked() |
2 | script.Parent.CFrame = CFrame.new(POSITION OF BRICK))*CFrame.Angles(script.Parent.CFrame.r+Vector 3. new(HOW MUCH YOU WANT IT TO ROTATE) |
3 | end |
4 | script.Parent.ClickDetector.Clicked:connect(Clicked) |
Try
1 | function onClicked() |
2 | script.Parent.Rotation = Vector 3. new( 0 , 3 , 3 ) |
3 | end |
4 | script.Parent.ClickDetector.MouseClick:connect(onClicked) |