#How can i have a part follow a player smoothly with a bit of lagging behind?
1 messages · Page 1 of 1 (latest)
Use module script + loop
You can make variables for starting and ending positions, and continuously tween it
yeah but once you make a tween arent the start and end position set the same until you create a new one?
** You are now Level 4! **
do u mean following u like a pet
yeah
all of the tutorials have it directly follow the player but i want it to catch up to the player once they stop
like pet sim wehn you teleport somewhere?
wdym by follow?
uh i dont play pet sim
i got it working on server side i think but its slightly laggy when following
hold on
this was what i was trying to do except theres a slight stuttering or lagging while it follows
what do you use for this
lerp with runservice step
is it on the server
yeah
AlignPosition object
do it on the client
Its called delay
All he has to do is creatr AlignPosition object and attach it to the object and players humanoidrootpart via attachments
Then boom
yeah but then isnt it a bit of huge workaround to send the position values through firing events to server so everyone sees the same thing
i dont like alignposition for non physics purposes
no?
If he wants an offest there should be a setting inthe alignpos object, if nit then creatr a different part welded to the hrp and attach the delayed part to the object
That sounds inefficient
you clearly have never done networking outside youtube tutorials
the biggest thing to keep in mind when making multiplayer for any game
is to handle as much things on the client as possible
no, thats only because of security concerns
Why not create a server script loop that uses tweenservice to constantly play a tween moving the part to a cframe offset to the hrp with enough speed to look delayed?
but that doesnt matter for visuals or if you have server authentication
just dont be stupid and it wont be an issue
aight u know what
just use alignposition at this point
🙏
Ts aint that hard bruh
its not a good option but its the only option you guys seem to comprehend
and its better than any of the other abominations your suggesting
Then whats your solution?
i said mine
making visual on server instead of client is stressing the server replicating that object to clients
wha is your point
you're saying to do visual on clients instead of server, i assume replication?
yes
not if you have different values
if you continously have tweens being made then it shouldnt be a problem