if script.Parent.Position.Z == Vector3.new(15.249, 19.157, 22.432) then
print("hi")
end
✓ ANSWER ACCEPTED
What is wrong with this? It is the exact coordinates that the part is at..
1 answer
✓ Accepted answer
script.Parent.Position.Z holds a single number value that represents the location on the Z axis. You are trying to compare this number to a Vector3 datatype, which will always return false.
If you want to compare the actual vector positon of the part you would write:
if script.Parent.Position == Vector3.new(15.249, 19.157, 22.432) then
print("hi")
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
