I want to make this part go to a position that raycast, but for some reason the position of the part is not changing.
here is my code:
local start = char.RightUpperArm.Position --the position you want the ray to start at
local lookAt = mouse.p --the position you want the ray to end at
local lengthInStuds = 80 --how long you want the ray to be in studs
local itemsToIgnore = {char} -- list if items for the ray to ignore
local ray = Ray.new(start, (lookAt-start).Unit * lengthInStuds)
local part, position = workspace:FindPartOnRayWithIgnoreList(ray, itemsToIgnore)
print(part,position)
local tween = TweenService:Create(Part, TweenInfo.new(0.5), {Position = Part.Position + Vector3.new(position)})
tween:Play()
Thanks for reading