How to move the spaceship

Im making a game where a group of players fly in space on the spaceship.
The spaceship will move while players do stuff on ship, which will require them to move on the ship.

And so I need to make the ship move, but I don’t know what way to do it.

  1. Use Old or new body movers to move the ship
  2. Move the entire galaxy instead of the ship, creating an illusion of moving the ship

If I will go with 1 way, then players won’t be able to move around the ship smoothly and items will also behave strange on it + risk of players getting to the farlands. But it’s easy to do, so maybe there’s a way to fix it?

If I will go with 2 way, I will have to do a bunch of calculations to make sure nothing will clip through the spaceship and etc, but it will ensure smoothness on the space ship and players won’t have risk of going to farlands.

I don’t know what way to go so I’m asking here which seems more worth to go with.

1 Like

use CFrame platform standing, i had the same problem but one tutorial helped me, i don’t remember it’s name but here is my example script:

local RunService = game:GetService("RunService")
local A = script.Parent

local LastCFrame = nil

	local result = workspace:Raycast(A.Position,,-50,0)) -- checks if player is low enough soo he can jump
	if result then
		local Hit:Part = result.Instance
		if Hit and Hit.Name == "Moveing" then
			if not LastCFrame then
				LastCFrame = Hit.CFrame
			local CurrentCFrame = Hit.CFrame
			if CurrentCFrame ~= LastCFrame then
				local Step:CFrame = CurrentCFrame*LastCFrame:inverse() 
				A.CFrame = Step * A.CFrame
				LastCFrame = CurrentCFrame

Read: Jailbreak train platform system? - #100 by Haydz6
the code it’s mainly from it

1 Like

This won’t work for me as there might be moments when unanchored parts on the ship.
This script might fix problems with players bodies, but not for the parts.
I sure could do same thing for the parts, but it would require a server to do that, which might cause performance issues.


this works with unanchored parts too, and don’t worry about server, parts don’t have to be on server, if you worry about cheaters and collisions, you can’t prevent them from doing weird stuff with parts, soo yea

What do you mean by “parts don’t have to be on server”? I don’t really understand what you mean by that.

1 Like

you told that you don’t want to cause performance issues, this script is not performance issue, if you use it smart, experiment with it soo you’ll find the best solution

If I will do that thing with the parts on client, then parts will be unsynced between players and server. It won’t do.

1 Like

soo do this on server, it’s not that much thread, if it’s one spaceship per game,it will not lag, btw you can use it on client and then sync server and client, see this tutorial

This will not work. The closet to this you could pull off would be to make sure they are all sitting when the ship is moving. When it is still the players could move around (if it was level). OR the ship really never moves but the space around it appears to be moving.

Bethesda just came out with the game Starfield … if you have played or seen this game you will notice they too are forced to stick to what I said above. Same goes for any other space game like this.

I know this for sure because I have made both game types stated.

Oh there will be movement alright, as in players getting pushed right threw the ship or glitching in the wall they just slammed into. The physics engine just can’t do this and keep everything running smoothly. I’ve even pushed this down to barley moving and the player still glitched and that was totally level. Rolling or going upside down is totally off the table, with free player movement.