Jailbreak train platform system?

Are you getting any errors?

4 Likes

No, however it seems to just keep me in the same position.

5 Likes

It would be nice if you posted your code in a code block. Formatting your code makes it easier for anyone to read your code and potentially help you with your problem.

Format a code block like so:

```lua
-- Your code here
```

Thatā€™ll become

-- Your code here
6 Likes

Fixed, thanks for the tip, never new that it excised.

4 Likes

I tried this method. It does, indeed move my character. But not as intended, as you can see here.

3 Likes

Yeah exactly what im having issues with.

5 Likes

Switched it to server, it keeps ur character in the same position, and once you walk it moves it back.

4 Likes

Iā€™m confused. Is this done on the client or server?

7 Likes

Both for replicating others

Client for preserving velocity to stay on the train

7 Likes

So your client is setting your character as fast as possible.

How about other clientā€™s characters? How are they setted?

3 Likes

See what I donā€™t get, I canā€™t use CFrame on local scripts.

3 Likes

2 Months later and we still donā€™t have the answerā€¦ :frowning:

3 Likes

Yep, i have no idea on what to do differently.

1 Like

This is what I do and my version works pretty well.

local Players = game:GetService("Players")
local player = game.Players.LocalPlayer
local RunService = game:GetService('RunService')

local LastTrainCFrame

local Function
local Function2


Function = RunService.Heartbeat:Connect(function()

--------------------------------------------------------------- CHECK PLATFORM BELOW

local RootPart = player.Character.LowerTorso

local Ignore = player.Character

local ray = Ray.new(RootPart.CFrame.p,Vector3.new(0,-50,0))

local Hit, Position, Normal, Material = workspace:FindPartOnRay(ray,Ignore)

if Hit and Hit.Name == "RaftTop" then -- Change "RaftTop" to whatever the moving part's name is

--------------------------------------------------------------- MOVE PLAYER TO NEW POSITON FROM OLD POSITION

local Train = Hit
if LastTrainCFrame == nil then -- If no LastTrainCFrame exists, make one!
	LastTrainCFrame = Train.CFrame -- This is updated later.
end
local TrainCF = Train.CFrame 

local Rel = TrainCF * LastTrainCFrame:inverse()

LastTrainCFrame = Train.CFrame -- Updated here.

RootPart.CFrame = Rel * RootPart.CFrame -- Set the player's CFrame
--print("set")

else
LastTrainCFrame = nil -- Clear the value when the player gets off.

end

Function2 = player.Character.Humanoid.Died:Connect(function()
	Function:Disconnect() -- Stop memory leaks
	Function2:Disconnect() -- Stop memory leaks
end)

end)

In my case, ā€˜RaftTopā€™ is the bright, large plank of wood on top of the raft. Slightly hard to see in the video but the player does turn with the platform. The player can jump on while itā€™s moving and move with it, it works just as the Jailbreak trains do. Also yes, I was testing a raft with no water. I know it looks ugly.

Hope I could help! Feel free to ask any other questions if you need extra help or if something doesnā€™t work.

322 Likes
How to stop players from falling off moving platform when jumping
Keep a player on top of a volatile moving platform?
Jumping on a moving object
Need help making a moving platform using only scripts
Character jumping on a moving platform
Moving Cframe plane
Good cframe-based train moving system?
Moving Platform issue
Jailbreak train platform system script problem
Moving platform issue
Keep player smooth on moving platform?
Best method to create a moving object that players can stand on?
How to make Player Move with Model
Ability to preserve Humanoid momentum
Make a player stick to a part that is being tweened?
Player falling sliding off moving platform
Need Help With TweenService
Moving ship bug
How to weld a player to an elevator?
Tween player together with truck?
Making a sideways elevator
How can I make players stick to a train?
Player camera lagging behind when riding tweened part
How to conserve momentum when jumping/falling off moving objects?
How can I move a player on a tweened object?
Addind position to HumanoidRootPart every stepped doesn't allow me to move
Players falling of train
Player Momentum when jumping on moving boat
Hinge Motor Spinners get out of sync in obby game
How do I prevent the player from falling off the part?
I don't know what to call this JUST CLICK!
Is it possible to move a model slowly to another place?
Moving platform wont go vertical correctly
How to create a moving platform with BodyMovers?
Make players stick to moving parts
Walking in a moving BasePart (plane/spaceship)
Make part move with other part
Make a player stick to a client handled moving object
Help in improving the code
How to make ridable moving part?
Model:SetPrimaryPartCFrame() not moving the player as the model move
Players not sticking to moving platform [2]
Jumping on a moving platform
Making your character move relative to the part it's standing on for parts being moved with CFrame and TweenService?
How do I make players "stick" to a part?
Smooth player standing on the train system?
Platformers Moving without Player
How to make moving platform that sticks to you
Jumping on a moving object
How to make Elevator less jittery/bumpy and more smooth?
Player jump on moving unanchored platform, Landed State delay
Smooth player standing on the train system?
How I can make a rideable moving platform?
How do I make a player move with a part?
How to make smooth moving platform that moves players on it?
Getting a largeish spaceship to move properly with players on board
Need Help Removing The Wall Stick Part of @EgoMooses Wall Stick Controller
How would I make a character move with a part that it is standing on?
How would I make a boat that a player can jump on
Making a player move while standing on a moving part

Wow. Thank you so much, this thread has gone unnoticed for such a long time and i lost all hopes. Ill be sure to give you credit whenever i use this.

3 Likes

No problem! Iā€™m glad I could help!

3 Likes

Whats funny is that I was literally just looking for this and you posted a solution 40 mins ago lmao

Thanks my dude https://gyazo.com/a7ce4055d9cc3305451c77a15651b76d

5 Likes

Do you have any idea why it doesnā€™t work for body movers? I seem to get pulled around a lot for some reason and then I get flung off when the plane moves fast https://gyazo.com/3590beb2155a8d7271a4ad77d2ab4e52

1 Like

Iā€™ve never tried it with body movers so Iā€™m not sure. My only idea is that something could be conflicting with it, because as long as the part is not anchored or welded to another anchored part Roblox tries to keep the player on it themselves.

2 Likes

Yeah I realised that. My current plan is to make a ā€œfakeā€ part that gets put to the position of the floor every second, and then Ill use that for the platform.

3 Likes