script.Parent.TextButton.MouseButton1Down:connect(function()
script.Parent.Load.Rotation = (+24)
end
You'd think this would be the way to rotate it. Can someone fix this?
script.Parent.TextButton.MouseButton1Down:connect(function()
script.Parent.Load.Rotation = (+24)
end
You'd think this would be the way to rotate it. Can someone fix this?
script.Parent.TextButton.MouseButton1Down:connect(function()
script.Parent.Load.Rotation = script.Parent.Load.Rotation+24
end
That wouldn't work either.
Well to begin with, there are many issues. Starting off with the "end". When using a connect(function() you must end the statement or function with "end)". Also, when you did script.Parent.Load.Rotation = (+24) there was another error. (+24) is not a valid statement either. You need to do
script.Parent.Load.Rotation = script.Parent.Load.Rotation +24
Next to make sure the frame/image label doesn't go past 360, we need to do
if script.Parent.Load.Rotation >= 360 then
script.Parent.Load.Rotation = 0
end
The final code is down below:
script.Parent.TextButton.MouseButton1Down:connect(function()
script.Parent.Load.Rotation = script.Parent.Load.Rotation +24
if script.Parent.Load.Rotation >= 360 then
script.Parent.Load.Rotation = 0
end
end)
Your welcome.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Please show errors.