Hi, so I’ve made this simple warp system similar to that of the Galaxy game on roblox. However, there’s a problem in which the ship would go in some weird other direction, rather than the “front” of the ship.
Here’s what I mean
Here’s my code related to it:
local pos = ship.PrimaryPart.CFrame.LookVector * distance
local warpBody = Instance.new("BodyPosition")
warpBody.Parent = ship.PrimaryPart
warpBody.P = 1250
warpBody.D = 300
warpBody.MaxForce = Vector3.new(1,1,1) * math.huge
wait(0.1)
warpBody.Position = ship.PrimaryPart.CFrame.LookVector * distance
I simply do not know why this happens, it’s so confusing…
What have you tried?
- I’ve set the “front” of the ship to the actual front of the ship
- Visualizing it with a brick. Displayed it in the same opposite direction.