Code I have so far:
script.Parent.ClickDetector.MouseClick:Connect(function() script.Parent.CFrame = script.Parent.Parent.FrontHood_I.CFrame script.Parent.Orientation = ("0, 0, -30") end) script.Parent.ClickDetector.MouseClick:Connect(function() script.Parent.CFrame = script.Parent.Parent.FrontHood_J.CFrame script.Parent.Orientation = ("0, 0, 0") end)
Both parts are coded in the same format except different Cframe values and Orientation values. I click the block I want to move once, and yay; it moves to the correct position (position is FrontHood_I's which does not include orientation) and orientation! But I want the block to move back to it's original position, I put in FrontHood_J's Cframe (which is EXACTLY the block's original position) yet for some reason it doesn't move back nor does it rotate back? It's like half of my script works yet the other half is just, well - BROKEN!!
If nothing can fix this, my last resort is to use a wait and debounce, which I really DO NOT want to use. Please help!
When setting orietation, you cant just say (0,0,0), you need to use Vector3.new(0,0,0) as XYZ. BUT Cframe includes orientation so I dont see the need anyways.