Hi Guys,
I just want to start off by saying that I am very new to scripting and still learning a lot everyday. That is actually why I am making this post, as I have ran into something that I cannot understand, and am hoping that someone can explain it to me.
Basically, I have a local script inside an NPC. I want to check the position of this NPC for use in further code later in the script.
To do this, I have tried two ways.
-
Defining the HumanoidRootPart like this
local Root = workspace.NPCs.Feugazi.HumanoidRootPart
-
Defining the HumanoidRootPart like this
local RootTest = script.Parent.HumanoidRootPart
I then add print(RootTest.Position)
and print(Root.Position)
to the script and this is the output
Can anyone explain why I am getting two different position for the same object?