Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Click > Rotate?

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

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)

1 comment

0

'end' doesn't work. Please figure out what's wrong.

Try

function onClicked()
    script.Parent.Rotation = Vector3.new(0, 3, 3)
    end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

2 comments

0

Orlando777, It's kind of working... But, it's like a door, so whenever I click the button, it teleports to the roof.

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.