#NPC movements feels really laggy whenever I put Cframe.Lookat
1 messages · Page 1 of 1 (latest)
I was thinking into maybeeee putting the lookat as a client thing, where the server would remote send the information to the client, it would pass down the target and npc, and then make it only when the npc is chasing somebody, that it would send such information to the client, and that visual would only happen in the client, but I'm afraid that would create a sort of visual bug, where the NPC wouldnt follow you due to being close in a certain orientation, but the player doesnt know that because for them it looks everything is fine
** You are now Level 6! **
im not a total expert or anything, but i think cframes are smoother than vector3s
try using that
lessen the delay
you can just create a seperate thread and run the CFrame.lookat() part there with less of a delay and it would look fine
then you dont have to worry so much about overwhelming the client with information
Tween on the client lerp on the server
Im already usijg cframes, the vector 3 is just in there just to cancel out the Y value
The delay on the loop is .heartbeat, which is supposed to be frame by frame, im not sure if there is something that can be more smoother than hearbeat, maybe i could try using different runservices
Yes do renderstepped
Could you explain to me a little bit better?, im not sure what you meant
Oh shit true
Instead of using :MoveTo, you want me to use lerp to the waypoints?
if you could show me the view if it lags on server side then i would know, cause if it doesnt lag on server then then whatd you do is just send the nextposition of the npc to the client and the client will lerp the moveto position every renderstep
hey wassup im back, and yea it doenst lag at all on the server, its just the client
i might do the lerping on the client