Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Object X axis and Local Space inverted? [SOLVED]

I'm driving crazy here folks! please may someone explain me what's going on?.... I need discover which side of the object the mouse click was, so i would use the X axis value, if it is positive, left, otherwise right, simple! but no! the X axis seems to invert itself if i click from the other side of the object, look the image problem

the values shown in the output are the X axis value from the object's center to the mouse click position, using this command 'mouse.Hit:pointToObjectSpace(object.Position).p.X'

1 answer

Great news!! someone named "Operaman" gave me the solution, i'm very thankful! the solution was:

mouse.Target.CFrame:inverse()*CFrame.new(mouse.Hit.p)).X

This discussion is preserved as it was. New answers, comments, and votes are closed.