Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Click > Rotate?

Asked by 10 years ago

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.

function onClicked()
    script.Parent.Rotation.new = {0,3,3} --the actual rotation.
    end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

2 answers

Log in to vote
0
Answered by 10 years ago
function Clicked()
script.Parent.CFrame = CFrame.new(POSITION OF BRICK))*CFrame.Angles(script.Parent.CFrame.r+Vector3.new(HOW MUCH YOU WANT IT TO ROTATE)
end
script.Parent.ClickDetector.Clicked:connect(Clicked)
0
'end' doesn't work. Please figure out what's wrong. DDDropTheBase 0 — 10y
Ad
Log in to vote
-1
Answered by 10 years ago

Try

function onClicked()
    script.Parent.Rotation = Vector3.new(0, 3, 3)
    end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
0
Orlando777, It's kind of working... But, it's like a door, so whenever I click the button, it teleports to the roof. DDDropTheBase 0 — 10y
0
What is the script in? The player or a part? The script I wrote is intended for a part with a clickdetector in it. Orlando777 315 — 10y

Answer this question