function fire(vTarget) local vCharacter = Tool.Parent; if vHandle == nil then print("Handle not found") return end local dir = HRT.CFrame.lookVector --dir = computeDirection(dir) local missile = Rocket:clone() local pos = HRT.Position + (dir * 5) local EggY = HRT.Orientation.Y missile.Position = pos missile.CFrame = CFrame.new(pos, pos + dir) missile.Orientation = Vector3.new(0, EggY, 0) local bodyForce = Instance.new('BodyForce', Rocket) bodyForce.Name = 'Antigravity' bodyForce.force = Vector3.new(0, Rocket:GetMass(), 0) local vPlayer = game.Players:playerFromCharacter(vCharacter) if vPlayer == nil then print("Player not found") else end missile.RocketScript.Disabled = false missile.Parent = game.Workspace missile:SetNetworkOwner(vPlayer) local CreatorTag = missile.CreatorTag vPlayer = CreatorTag.Value SpawnPart.ParticleEmitter.Rate = (200) wait(0.01) SpawnPart.ParticleEmitter.Rate = (0) end
The script above is for a rocket launcher in my game that had issues with the rocket not flying smoothly. I found out it was because of the Network Owner issue. So I added the SetNetworkOwner line at 36 and it flies perfectly smoothly now. However, after adding that line, the rocket seems to have gravity. I have no idea how changing the Network Owner could affect the rocket's actual flight, but it doesn't fly straight anymore. It falls as it flies, like gravity now applies to it, which didn't happen before. Any ideas?