Currently trying to make something that tracks a part’s location, can’t really seem to have it to print the position value.
So far I’ve tried doing:
``
local Part = script.Parent
local PartPos = Part.Position
print(PartPos)
``
Not really sure why this simple line doesn’t work. I’m assuming I’m missing something, or the position isn’t recognized as a simple value.
Anything embedded in a print function is automatically ran through the tostring function. Surprisingly, Vector3s cannot become strings unless done manually.
This works normally, but since I’m inserting a part within the StarterCharacter it for some reason doesnt. I’ve tried adding a ‘wait(1)’ to insure that it wasn’t the script running before the player spawns.
This should work if the script is parented to the part in starterCharacterScripts.
local part = script.Parent
local partPos = part.Position
local partOrientation = part.Orientation
print("Position:", partPos.X, partPos.Y, partPos.Z)
print("Orientation:", partOrientation.X, partOrientation.Y, partOrientation.Z)