As it says in the title, i want to manage the Network Ownership | Roblox Creator Documentation of a projectile to all the players in the game. However i cant figure out how to do this, any ideas/methods would be appreciated,
I have tried a few methods such as reading a string value with all the players names in it but that still does not work.
I’m pretty sure network ownership can only be granted to a single player
The function is SetNetworkOwner and not SetNetworkOwners
If you want to achieve the functionality you’re looking for, you’d need to have a RemoteEvent that any player can call to set the CFrame of the part. Doing that’s not always the best idea, but I guess it’d depend on your use case.
I know that, but the reason I’m trying to set the owner to the players is due to projectile lag when the server manages the projectile. (This post I was covering Projectile "Lag")
What you might be thinking of is having a copy of the bullet on all of the clients. You could either send the bullet to the client through instances (adding instances, adding the bullet to PlayerGUI, changing Value settings) or using RemoteEvents.
For example, you could use RemoteEvent:FireAllClients(bulletInfo). Then on the client you could handle the event by creating a bullet on the client with the bulletInfo.
It depends how you do it and what you’re trying to optimize.
I read your post, here is what I would recommend:
[Client]: Create a cannon ball on the player’s client who activates it
[Client]: Send info about the cannon ball with a start time(from a synced timer) and the path
[Server]: Calculate where the cannon ball should be (connection/loop based on time and path), raycast/hitbox on the server
[Server]: Send the cannon ball info to the other clients
[Other Clients]: Calculate on the client where the cannon ball should be at that time (again from a synced timer)
What this does is make the cannon ball be at the correct position for every player and removes the lag for the player who fires it. Other players could see the cannon ball jump a little out of the cannon, but you can handle that with tweening on their clients.
Note: You only fire one remote to each player other than the player who fires. After that, use the sent information to get where the cannon ball should be.
The method above is a little complex. Here is a fairly simple article that talks about lag and firing cannons: