Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

SetPrimaryPartCFrame not moving where I want it to?

Asked by 10 days ago

So I'm making a controllable ship, and to move it I'm using a VehicleSeat. To move the ship, I use 'SetPrimaryPartCFrame' with the Primary Part being the bottom of the ship, so like this: "boat:SetPrimaryPartCFrame(CFrame.new(boat.PrimaryPart.CFrame.lookVector * 1))" I expect it to move a bit forward, but all it does is move it to a random part of the baseplate. I know for a fact that the PrimaryPart set is correct, and that the front is at the actual front of the ship. I just don't know what's happening, if you have any idea, please tell me!

0
Well, do you know that the lookVector you're using is being assigned to a position Vector3? MCAndRobloxUnited 1517 — 10d
0
Because you're giving CFrame.new() one parameter, it is being assigned only with the position. MCAndRobloxUnited 1517 — 10d
0
also, why do you bother multiplying the look vector by 1? theking48989987 1669 — 10d
0
Yes, that's also a bit odd. Multiplying anything by 1 leaves it the same. MCAndRobloxUnited 1517 — 10d
View all comments (4 more)
0
try modifying it relative to the current position of the ship in the direction of the look vector theking48989987 1669 — 10d
0
What do you mean by that/ sweettart13947 20 — 10d
0
boat.PrimaryPart.Position * boat.PrimaryPart.CFrame.lookVector MCAndRobloxUnited 1517 — 10d

Answer this question