I am curious how to say if just one orientation axis is a certain number. do you use underscores for the other axises?
function onClicked() if script.Parent.Union.Orientation.Z == 2 then print('Hello World!') end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Orientation is a Vector3 value, so it has X,Y,Z,Magnitude, and unit (not sure about unit) using == 2 will not work if Orientation.Z == 2.1 so you can round the rotation before
local function round(val) return math.floor(val+0.5) end function onClicked() if round(script.Parent.Union.Orientation.Z) == 2 then print('Hello World!') end end script.Parent.ClickDetector.MouseClick:connect(onClicked)