I used this script to set a parts Orientation when it's clicked, but it says "Cframe is not a valid member of part". Why won't this script work?
local clickdetector = game.Workspace.trap.ClickDetector clickdetector.MouseClick:Connect(function() trap.Orientation = CFrame.Angles(0,0,-90)
That is because the Orientation
property of a Part is not a CFrame. It is a Vector3. Do the same thing you were doing but with Vector3.new() instead of CFrame.Angles()
local clickdetector = game.Workspace.trap.ClickDetector clickdetector.MouseClick:Connect(function() trap.Orientation = Vector3.new(0,0,-90)
Also, I am assuming you have an end to close the Connect
?