I can't figure out how to rotate a part 90 degree after clicked on.
local topCenter = script.parent local clickdetector = game.Workspace.Wedge.ClickDetector clickdetector.MouseClick:Connect(function() topCenter.Orientation = Vector3.new(-90,0,0) end)
I'm using this code but it only rotates the part once.
I want to be able to rotate it multiple times.
You need to add # of degrees to the number that the x axis is orientated to.
local turnNum = 0 -- this gets manipulated local turnAmount = -90 -- change to whatever local topCenter = script.parent local clickdetector = game.Workspace.Wedge.ClickDetector clickdetector.MouseClick:Connect(function() turnNum = turnNum + turnAmount topCenter.Orientation = Vector3.new(turnNum,0,0) print(topCenter.Orientation) -- remove if desired end)