ituzis
(ituzis)
August 7, 2024, 12:44am
#1
I’m trying to make it so when your standing on a moving platform, and you jump, you move with the platform and don’t fall off.
I couldn’t really find any post about it on the forum, and If I did then the post was probably years old.
This clip is from the game Desert Bus, you can see that when I jump, I don’t move back. This is exactly what I’m trying to replicate.
I’d appreciate some help! Thanks
4 Likes
xAvrice
(avrice)
August 7, 2024, 12:48am
#2
Maybe you could try adding the velocity of the part the player is standing on to their AssemblyLinearVelocity while the player is on the platform?
ituzis
(ituzis)
August 7, 2024, 1:11am
#3
Do you think there is other ways? I’ve tried this before. It sorta worked but was really buggy
xAvrice
(avrice)
August 7, 2024, 1:14am
#4
This post was linked in one of the topics you replied to recently. Have you tried the solution in here?
The solution seems to just calculate the difference in the platform’s previous and current CFrame and then apply that difference to the player (i think).
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,Vec…
You might be able to find a solution in these forums
This will greatly improve official Roblox events, like the train issue in Jailbreak during the RPO event
Yep, i have no idea on what to do differently.
1 Like
Yeah this has been a tough problem for a while. Multiple games have coded their own fixes to this, such as Jail Break with their trains.
A very easy fix would be to use the new character controller (currently in beta):
Continuing the discussion from New Humanoid Physics Controller - Beta :
You can check that out here:
Past Updates... <a name="controller-beta-update-v03-1" class="anchor" href="#controller-beta-update-v03-1"></a>Controller Beta Update - v0.3
What a year! We have another set of Controller updates and fixes releasing today that address more of your bugs and feedback.
AirController.CancelAirMomenum replaced with AirController.MaintainLinearMomentum and AirController.MaintainAngularMomenum to allow you to separately toggle whether you keep your angular a…
The other option is to program something to modify the physics a little (such as adding a CFrame to the character based on the change of the CFrame of what they last stood on and the position of the character relative to that). There are probably some things the forum’s resources that have this behavior.
ituzis
(ituzis)
August 7, 2024, 5:23pm
#7
I’ve read basically all of these forums, their outdated and I’ve tried doing what they did and it just doesn’t work.
ituzis
(ituzis)
August 7, 2024, 5:23pm
#8
I really tried this, and I think my issue was setting it up. I got really confused with it lol.
1 Like
It only works if the part is being moved with physics, if that helps.
It should work if the part is being moved by physics (and not the CFrame being directly modified).
Though it is in beta, so it might be hard to set up.
ituzis
(ituzis)
August 7, 2024, 8:30pm
#10
Yea it was using velocity. still didnt change anything.
I think i just set it up wrong, but theres really no tutorials showing how to do it so.
1 Like
BendsSpace
(BendsSpace)
August 7, 2024, 9:51pm
#11
You might find this article help:
NOTICE 2
This week, we are enabling fixes to the ClimbController, and enabling horizontal climbing capabilities.
This will work by having the ClimbController read localized X and Z dimensions on MovingDirection, and they will be projected onto the climbed surface - just like how the GroundController works now. Previously it only looked at Z. This means if you’re using the example scripts provided in this post (or otherwise copying Humanoid.MoveDirection properties onto the ControllerManager),…
The one I sent said it was now outdated and to go to the article above.
Specifically you might want to try out this part:
Example Scripts
You can add these scripts to you experience to try using an avatar with the new physics controllers
InitializeCharacters.lua (1.5 KB)
This server script should be placed in ServerScriptService.
For every player that joins, it will set Humanoid.EvaluateStateMachine
to false, and insert the necessary physics controller and sensor instances to the character model.
ControllerStateMachine.lua (4.3 KB)
This local script should be placed in StarterPlayer>StarterCharacterScripts.
This will manage swapping between basic Run, Jump, Climb, Freefall, and Swim states. It’s not intended to match exactly how the Humanoid handles these transitions, instead just covers basic input and movement.
3 Likes
xAvrice
(avrice)
August 8, 2024, 3:01am
#12
I believe BendsSpace’s linked articles would be a better solution overall, but what was the problem you faced when you had tried the post I linked? I tested the script just now to make sure and it seems to work for me(although I just tested it with a single part, using the primarypart of a model in the script should also work).
1 Like
ituzis
(ituzis)
August 8, 2024, 8:45pm
#13
ill try this out, thanks for the support
1 Like