@XYXTENTAC1ON (S7venthUtopia) posted a new topic, subject "LinearVelocity Glitches NPC in Knockback System". It read:

   Hey guys, my linear velocity system is not working as it should. I am trying to create a knockback / retreat jump thing for my enemy NPC. This is whats happening:
    
    Client-SIde:
    
    https://gyazo.com/a3bd0645fe59df82333d34b99364a6b2https://i.gyazo.com/a3bd0645fe59df82333d34b99364a6b2.gif(image larger than 10 MB)
    
    As you can see, its super glitchy and the npc teleports.
    
    Server-Side:
    
    This is what its supposed to look like.
    
    This is how my system works:
    
    I have a - Functions ModuleScript
    [code] 
        function module.CreateForce(Time, ForceName, ForceLocation, ForceVelocity, Looped, F, Direction)
        	local Force = Instance.new("LinearVelocity", ForceLocation)
        	local Attach = Instance.new("Attachment", ForceLocation)
        	Attach.Orientation = Vector3.new(0,Direction,0)
        	Force.Attachment0 = Attach
        	Force.VelocityConstraintMode = Enum.VelocityConstraintMode.Line
        	Force.MaxForce = F
        	
        	Force.LineVelocity = ForceVelocity
        	Force.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
        	Force.Name = ForceName
        
        	debris:AddItem(Attach, Time)
        	debris:AddItem(Force, Time)
        end
        
    [/code]
    
    And i call it in this Server Script:
    [code] 
        Functions.CreateForce(.1, "SelfForce", HRP, 100, false, 5500, Vector)
        
    [/code]
    
    The LinearVelocity is created on the server yet the Lag is still there on the client. Why?

To which @WhiteOutPL (WhiteOut) replied

    Setting the NetworkOwner to the server might fix this.
    [code] 
        model:SetNetworkOwner(nil)
        
    [/code]

Then @XYXTENTAC1ON (S7venthUtopia) said

    I have that already!
    [code] 
        for i,v in ipairs(enemy:GetDescendants()) do
        	if v:IsA("BasePart") and v:CanSetNetworkOwnership() == true then
        	v:SetNetworkOwner(nil)
        	end
        	if v:IsA("BasePart") then
        		v.Massless = true
        	end 
        end
        
    [/code]


{'source': 'discourse', 'url': 'https://devforum.roblox.com/t/linearvelocity-glitches-npc-in-knockback-system/1946687', 'title': 'LinearVelocity Glitches NPC in Knockback System', 'views': 78, 'has_accepted_answer': False, 'word_count': 253, 'like_count': 0, 'reply_count': 1, 'participant_count': 2, 'posts': 3, 'tags': 'scripting studio bug', 'author': '@XYXTENTAC1ON (S7venthUtopia)', 'participants': '@XYXTENTAC1ON (S7venthUtopia), @WhiteOutPL (WhiteOut)', 'image_url': ['//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/4X/d/c/0/dc0514b8b1dfc44d12b08f488e821fa8ac879b29.gif'], 'created_at': '2022-08-31T15:28:41.029Z', 'last_posted_at': '2022-08-31T15:46:08.561Z'}