Im trying to rotate an ImageLabel on clicked, nothing happens:
rotate = script.Parent.Rotation
function Begin()
rotate = rotate + 1
end
script.Parent.MouseButton1Down:connect(Begin)
Im trying to rotate an ImageLabel on clicked, nothing happens:
rotate = script.Parent.Rotation
function Begin()
rotate = rotate + 1
end
script.Parent.MouseButton1Down:connect(Begin)
rotate = script.Parent.Rotation is creating a new variable rotate, getting the value of script.Parent.Rotation and setting rotate to that value. rotate = rotate + 1 changes the variable rotate, which is an independent variable that is not in any way linked to the origin of the value initially given to it.
function Begin()
script.Parent.Rotation = script.Parent.Rotation + 1
end
script.Parent.MouseButton1Down:connect(Begin)
This discussion is preserved as it was. New answers, comments, and votes are closed.