#How can i script movement correctly?
1 messages · Page 1 of 1 (latest)
idk
tween them to move a certain distance and add an animation to play while this happens
however you will have to sync it up so it looks smooth
like the torso or the hrp?
hrp
You could use linear velocity, and then you make sure the force isn't too high since this will cause the character to fling, moreover you can tweek the velocity
I wouldn't recommend this since this may cause the player to go through walls, or it could just be buggy overall
i've tried that but the player is still affected by the floor friction making the force weirdly unpredictable
wait is this for like an npc or a player
an actuall player
ohh,
i've used linear velocity for this like CallMe_A said, and just added a invisible part to like the torso so that you can't hit and fly off walls and it also stops you
linear velocity shouldn't be unpredictable due to floor friction in my experience
however this all depends on the terrain/map you have, certain bumps and stuff can be really bad for it
if the force of the linear velocity is still a problem, try using the tweens and also adding a hitbox to the player that sends a signal using bindable or remote events to stop the animation and tween
tldr: linear velocity works but if too unpredictable still then use tweens and a hitbox
oh i might've used line force i beleve where you just input one attachment and change the direction on the force itself.
But the linear velocity thing, when the charracter reaches the part doesn't he kinda spring back and forth around the part?
i don't think it should, pretty sure it only happens if you set the force really high
yeah its the kind of issue i had on the very fast movements
i think if you weld an invisible cube it might stop the springing from happening
tbh, I've always found bodyvelocity much cleaner compared to linearvelocity like currently linear velocity causes my character to jiggle and turn into micheal jackson so if nothing else works you might have to go with bodyvelocity but it should be the last thing you go for yk
its said as depcreated so i never paid attention to it but i've seen it pop up around some forums so idk
how does it work?
so basically it doesn't use any attachments at all
** You are now Level 11! **