#Trying to make me stand on a train while its moving

1 messages · Page 1 of 1 (latest)

junior pagoda
#

when the train is moving it obiously makes me slide off but i tried to make me not slide off and i just can't find a fix for it. This is the closest ive come:

tepid geode
#

How are you moving the train?

#

If your tweening I believe there is a dev forum post which covers how to fix it

junior pagoda
#

ehh i tried with physics based moving but the train wouldnt even move then. i cant really script much so i used the assistant. i think it uses pivotto

tepid geode
#

of how your moving the train

#

Your probably going to need to use linear velocity

junior pagoda
#

its very long

#

i told the ai to use that but the train wouldnt budge

tepid geode
#

Its cool

tepid geode
#

you should also make it that the train has a hitbox

#

and you move that hitbox

junior pagoda
#

is this too big?

vague valveBOT
#

studio** You are now Level 4! **studio

tepid geode
#

your train moves in a straight line right?

junior pagoda
#

yeah.

tepid geode
#

ye than linear velocity will work just fine

#

if you had turns however, it'd probably be a different story

#

since you'd need to move each cart alone you feel me

junior pagoda
#

yeah

tepid geode
#

also make sure all the train's parts are massless

junior pagoda
tepid geode
#

yup that property

#

thats probably why your train didn't move

junior pagoda
#

it shouldnt be anchored right?

tepid geode
#

linear velocities max force was too small

junior pagoda
#

or?

tepid geode
junior pagoda
#

alr

tepid geode
#

yk how to code using linear velocity right?

junior pagoda
#

i cant but my buddy can:

tepid geode
#

yk you can't just depend on the roblox assistant right

#

Look imma give you the step

#

but I won't give you any code

junior pagoda
#

im trash at scripting i can like only do this:
local part1 = instance.new("Part") or smh like that

junior pagoda
tepid geode
#

and you pray that ai will do the job

vague valveBOT
#

studio** You are now Level 10! **studio

junior pagoda
#

lol!

tepid geode
#

So basically:
Add a hitbox to the train, make sure all the parts of the train are massless including the hitbox
Make sure the front face of the part is facing the direction the train will be moving
Now you weld all of the train's part to the hitbox
In your script your gonna add linear velocity, and you change the vector relativeness to world
now you will add a vector velocity which will make the train move in the lookvector of the part, and you play around with the force till you feel its good

soft pelican
tepid geode
tepid geode
junior pagoda
#

should i ask youtube or can i ask you? how do i make a hitbox...

tepid geode
#

your soo cooked bro

#

it should cover the whole train

junior pagoda
#

like a touch thingimigi

tepid geode
#

Its just a large invisible part

#

which cover the train

junior pagoda
tepid geode
#

nice

junior pagoda
#

cancollide off right?

tepid geode
#

just make sure that its touching the train track

#

or the wheel of the train

junior pagoda
tepid geode
#

and the highest point in the trai

junior pagoda
#

this good?

tepid geode
#

bro

#

both the highest

#

yk

#

what

#

it'll still work forget it

junior pagoda
#

but youre meant to stand on the train so how else am i supposed to do it. sorry if im making you go exponentially dumber

tepid geode
#

yk what

#

just put the part infront of the train

tepid geode
#

just make sure its not touching the train

#

and that'll be good

junior pagoda
#

should the hitbox be in the train model?

tepid geode
#

because the box needs to be collidable

junior pagoda
#

alr so what now?

tepid geode
#

anyways

#

now that you have done that

junior pagoda
#

this hitbox can collide

tepid geode
#

true

junior pagoda
tepid geode
#

ok good

#

now

#

weld all of the train parts to this part

#

in the settings of the weld constraint

junior pagoda
tepid geode
#

oh fuck

#

bruuh

#

tbh, it ain't worth working on this train if you can't script mate

junior pagoda
#

buddy... srry for being trash. the scary world of lua is a world i cant get through.

tepid geode
junior pagoda
#

u bud

tepid geode
#

ok kiddo

#

chillax,

junior pagoda
#

i aint even that young bruh. im 14 soon 15

tepid geode
#

your yung af

junior pagoda
tepid geode
junior pagoda
#

roblix studio

tepid geode
#

I'm not that old lmao

#

I'm like 15 turning 16 soon

junior pagoda
#

BRO UR SAYING THAT IM YOUNG buddddddddddddddddddddddddddddddd

tepid geode
#

gotta focus on my physics online session now

junior pagoda
#

no

tepid geode
#

been tryin to help you, and not focusing on this sess

#

I have an exam on the 9th

junior pagoda
#

alr. go get your work done ill not help you fail college

tepid geode
tepid geode
tepid geode
junior pagoda
#

np go get to work now

tepid geode
#

ok kiddo

junior pagoda
#

good unc

#

when ur back from that could you tell me why i need a hitbox?

tepid geode
#

So its basically going to be the main part which actually moves the train

#

instead of complicating things

#

by taking into account the 250+ parts

#

instead

#

you just focus on one part

#

and how it is moving

thin jewel
#

You could get the train's velocity and whatever players are standing on it you'll add the trains velocity to the player

tepid geode
tepid geode
#

You shouldn't really think of it as a hitbox

#

but instead

junior pagoda
#

oh srry

tepid geode
#

a part which simplifies things

junior pagoda
#

well i gtg sleepie now the clock is half twelve for me rn.

tepid geode
#

sweet dreams kiddo

junior pagoda
vague valveBOT
#

studio** You are now Level 5! **studio

thin jewel
tepid geode
thin jewel
tepid geode
#

Went for scripter 2 and scripter 3

#

didn't get enough vouches tho

#

Got 3 vouches

#

then the vouches stopped coming

#

anyways, I'll probably say I'm scripter 2 low scripter 3 now

#

scripter 1 has like the very basics

#

Like you could make some basic system, but theyre not effecient nor is the code clean

junior pagoda
#

im back now. my script rank would prolly be like 0.5

junior pagoda
#

it made a script here but it doesnt work. (your instructions ofc) do you dare to find it? @tepid geode

junior pagoda
# tepid geode I shall escape

u dont really need to help me anymore. imma try to hire a pro scripter for my game. btw wheres the best place to hire?