Hello!

So first off, just a real quick disclaimer, I didn't get much sleep last night, so forgive me if the solution is literally right in front of me.

Anyway, I'm sending a raycast from a part and trying to create a new part at the hit position. This is my script:

wait(8)
part = Instance.new("Part")
part.Parent = workspace
part.Anchored = true
part.Position = Vector3.new(0,0,0)
local origin = script.Parent.Position
local lookDirection = script.Parent.CFrame.lookVector
local ray = Ray.new(origin, lookDirection * 500)

-- Raycast, ignoring the player's character

local part, hitPosition = workspace:FindPartOnRay(ray)
print(tostring(hitPosition))

if part then
	print("Hit part: " .. part:GetFullName())
	part.Position = hitPosition
else
	print("Did not hit part")
end

Even though I literally wrote 'part.Position = hitPosition', it doesn't move from it's original set position: 0,0,0. And, it says that it hit.

Please help, any of it is greatly appreciated, and also I am sorry if it is super obvious and a complete waste of your time!

Thanks! =D