Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

SetPrimaryPartCFrame not moving where I want it to?

Asked by 5 years 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? DeceptiveCaster 3761 — 5y
0
Because you're giving CFrame.new() one parameter, it is being assigned only with the position. DeceptiveCaster 3761 — 5y
0
also, why do you bother multiplying the look vector by 1? theking48989987 2147 — 5y
0
Yes, that's also a bit odd. Multiplying anything by 1 leaves it the same. DeceptiveCaster 3761 — 5y
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 2147 — 5y
0
What do you mean by that/ sweettart13947 105 — 5y
0
boat.PrimaryPart.Position * boat.PrimaryPart.CFrame.lookVector DeceptiveCaster 3761 — 5y

Answer this question