How to do this?

How do I do so if some part’s orientation’s X is bigger than 0 then something happens?

You can do it by checking the properties of part.

local part = game.Workspace.Part

if part.Orientation.X > 0 then
  --[[
    your code here
  --]]
end
4 Likes

when I write this script

local part = script.Parent
if part.Orientation.X = 0 then
print(“Hi”)
end

it says

Workspace.Part.Script:2: Expected ‘then’ when parsing if statement, got ‘=’

= should be used to set a value
== is for checking a value

so your code should be like this :

local part = script.Parent

if part.Orientation.X == 0 then
  print("Hi")
end
1 Like

Thank you for explanation :slight_smile:

Your welcome :heart_eyes: .

local part = script.Parent

 if part.Orientation.X == 0 then -- Isn't the symbol suppose to be a greater sign since he is trying to check if the Oritentation.X is greater then 0
    print("Hi") 
end