OK. I have a rocket launcher in my game with a recycled ROBLOX original rocket script. However, firing the rocket in game makes it pause for a fraction of a second, which means players moving forward or diagonal means that the rocket explodes, before it can travel it’s normal, continuous stream. I’ve been told by a friend that SetNetworkOwner will fix this however setting it to nil, LocalPlayer, both do not fix it
I’m a complete noob when it comes to networkownership because I’m too lazy and I never use it except this one time. Can anyone help? I’ll send pics if needed.
Have you tried changing the network owner before parenting it to workspace? Setting network ownership to the server will ensure players experience the same event, instead of the closest player calculating the physics, the server would handle it if set to nil. I haven’t experimented with changing the ownership before/after spawning the object. If I may ask, what is your function for causing the projectile to explode?
I’m currently finding a way to use NobleBuild’s suggestion of changing network owner before parenting to workspace, however in serverscripts you cannot SetNetworkOwner to nil as it “isn’t a descendant of workspace.” I’ve tried every conceivable way to assign network to the player as well yet I have gathered nothing. This script is in StarterPack in a tool and is not a LocalScript.
I’ve discovered my error as you are correct, the ownership can’t be changed before it is parented to workspace. I believe the work-around here would be to set the ownership after it’s parented to workspace first, then activate the movement/motion of the projectile after the ownership is changed.
part.Parent = workspace
--- begin functions here
I’m noticing a beneficial change to the projectile however the way this script is written, something in the positioning+activation function pauses it for a bit. I’m sitting here right now rearranging and deleting some things to minimize time usage. I think now it’s down to finding the issue in the Rocket script alone. Thank you however for your discovery as my ape brain doesn’t function past 8 PM.