Hey guys . I am trying to make a hitbox that will lock on the Y axis. When I update the hitbox on the server, the hitbox is very laggy . However , when I change it to client side, the hitbox is not teleported to the player in the server side even though I set the hitbox networkowner to the player
You shouldn’t be updating client-owned objects on the server. If the hitbox is client side then only the client should be updating it.
It sounds like an issue with your code when you say the hitbox isn’t being moved on the server despite the client having network ownership. You should double-check that network ownership is actually being given and when it is given only the client is setting its position.
I did give networkowner to the client .
Is the hitbox anchored? The server always has ownership of anchored parts even if you try change it.
Is the hitbox a single part? Or is it welded to other parts? All parts in an assembly need their network ownership set to the client to work properly.
the hit box is not anchored as if it is anchored , it will return an error. The hitbox is a single part
If you are setting the network owner and updating it on the client properly and it doesn’t replicate to the server, then it sounds like an engine bug which I am doubting. It’s hard to say anymore without more context.
I also want to ask if there is a reason why you need the client-side hitbox position to replicate to the server? The hit detection should be done on the client so the server should not need to know where the hitbox is.
I do hit detection on server because I dont know how to make a good anti cheat yet