Good evening!
Recently, I’ve stumbled upon a issue that I don’t have a clue on how to resolve it. I have a Part that I want to move forward based on World’s Axis, using CFrames. I’ve found something similar on Roblox Developer’s page, but the issue is that it doesn’t keep track of the direction that the Part should move towards.
To solve this problem I’ve been trying to use CFrame:ToObjectSpace() in order to get the desired position of my Part relative to the HumanoidRootPart at some distance apart, but I don’t know how to translate this position back to World Space.
local HCF = Character.HumanoidRootPart.CFrame
local TargetPosRelative = Clone.CFrame:ToObjectSpace(HCF).Position + Vector3.new(10, 0, 0)
What must I do in order to achieve something like this, without using Forces or anything else? By getting my target position relative to World Space I want to use TweenService to set this it.