LookVector not behaving the way it's supposed to be

I’m making a rail segment for a cart ride, and whenever a cart goes on it, it boosts the cart in the direction of where the front face of the rail is facing. But, whenever I rotate it in studio, it doesn’t change direction, and still faces the same way as the original rotation.

When it’s not rotated:
https://gyazo.com/7a05c10eecbac460f5bf722575b92733

When it’s rotated:
https://gyazo.com/8a78b47d0dbcc6593172947d81a6d3c5

(Keep in mind, it’s not the cart look vector, but the rail look vector [as per shown by the arrows])

I’ve been stuck on this for hours and I don’t really know why. Any help would be appreciated greatly.

1 Like

Post your script chars chars chars

1 Like
local vforce = Instance.new("VectorForce",part.Parent.Parent.PrimaryPart)
vforce.Attachment0 = part.Parent.Parent.PrimaryPart.Attachment
vforce.Force = v["Track-Long"].Beam.CFrame.LookVector * 50000
game.Debris:AddItem(vforce,.3)
The track is facing the correct way
2 Likes

Is that an actual Beam or an Attachment? If it’s the latter, you need to use .WorldCFrame instead.

1 Like

It’s a part, sorry about that. It’s not an actual beam

1 Like

I was barking up the wrong tree anyway, the issue is that the default VectorForce.RelativeTo is Attachment0. Set it to World instead.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.