Hello, I am guestie.
I am creating a soccer game and I need your help to make my soccer ball smoother.
The problem is, I set the network owner and the ball just snaps towards the player, not like a smooth transition. Please let me know how to fix it.
This is all the script consists of:
game:GetService("ReplicatedStorage").Events.Network.OnServerEvent:Connect(function(plr)
if game.Workspace:FindFirstChild("Ball") then
game.Workspace:FindFirstChild("Ball"):SetNetworkOwner(plr)
end
end)
Asking for help in the forums isn’t only so that you get the help you need, but for others to get help who might have the same or similar problems.
By giving a solution on another platform, such as discord, you deprive anyone else the solution, but also eliminate any discussion between contributors to your post, that might help refine a robust solution.
I was more meaning the ‘solution’ if it was solved. But still, would be nice if you could figure out how to do a video on here, so you could get more varied help.
Networking is a incredibly difficult topic and if you want smooth and perfect game then you’re required to learn stuff like client/server reconciliation, it took half an year to understand everything so I suggest you learn this slowly and for now use a laggy ball, it’s okay for you’re game to have some amount of lag, It’s not something you can 100% avoid anyways
I have a quasi solution to this, but its a bit complicated. Youd have to let the server own the ball(not in a loop), and have a hitbox on the ball itself running in a loop, that hits a client side hitbox also running in a loop/its own thread etc. That makes the lag a bit more manageable. Trying to do it where the player owns the ball is really hard.