#Knockback on client just not working

1 messages · Page 1 of 1 (latest)

zinc aspen
#

I have a script to find the nearest character, determines the distance and then saves the character into a variable.

It then fires all client with the character. In a local script in startcharacterscripts when the client receives it, it prints out character
but when i try adding linear velocity to it, nothing happens. the linear velocity is added but just doesnt move??

#
    
    for i,v in workspace:GetChildren() do
        if v:FindFirstChild("Humanoid") ~= nil and v.Name ~= player.Character.Name then
            local HRP = player.Character.HumanoidRootPart
            local distance = (HRP.Position - v.HumanoidRootPart.Position).magnitude

            if distance < 10 then
                print(v.Name )
                print(v.Humanoid.Health)
                v.Humanoid.Health -= math.random(5,10)
                Tween:Create(v.HumanoidRootPart, TweenInfo.new(0.2,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{CFrame = CFrame.lookAt(v.HumanoidRootPart.Position, HRP.Position)}):Play()
                Event:FireAllClients(v)
            
            end
        end
    end
    
end)```
#
    print(v.Name)
    local LV = Instance.new("LinearVelocity")
    LV.Parent = v
    LV.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
    LV.Attachment0 = v.HumanoidRootPart.RootAttachment
    LV.MaxForce = math.huge
    LV.VectorVelocity =  Vector3.new(0, 25, 100)
    wait(0.2)
    LV:Destroy()
    
    
end)```
#

please help before i lose all my hair

#

yes

#

still nothing

#

he wont move and hes not anchored

#

but the velocity is in his model which is so confusing

thorny tapir
#

Check if the ownership of the model belongs to the server

zinc aspen
thorny tapir
#

I think roblox determines ownership power based on the player who's been in the server longest

thorny tapir
zinc aspen
#

and if i use primarypart is says the same thing but just with humanoid root part

#

yeah

thorny tapir
#

I said .PrimaryPart and Idk what the function is called

#

In memory

#

It's :GetNetworkOwner()

#

My bad

zinc aspen
#

all good lemme try now

#

GetNetworkOwner is not a valid member of Model "Workspace.R6"

#

wait i used primary part and now it says

#

Network Ownership API cannot be called on Anchored parts or parts welded to Anchored parts

thorny tapir
#

🤦‍♂️

thorny tapir
#

One part in your R6 is anchored

zinc aspen
thorny tapir
#

Weird

thorny tapir
#

🧍

zinc aspen
#

oh wait u right

thorny tapir
#

If you don't specify what should own a part then a random player takes ownership

#

You can modify your own position locally because you have network ownership of your own model

zinc aspen
#

okay i created a new rig and made sure its all unanchored but that same error is happening

#

ill try that

#

same result it just really doesnt want to work

#

cant even find anyone with the same problem online

#

theres no error

#

and the velocity is inside the character

#

but it doesnt move

#

still doesnt work

#

yeah still no movement

#

yes

#

wait

#

wait

#

no its not working

#

and the velocity doesnt get added anymore

#

oh damn i got excited for a minute

#

i changed the remote event at one point and i was firing to the wrong event

#

i changed it back and thought it was all fixed but the original issue is still there

#

velocity in the rig but no moving

#

damn

thorny tapir
#

How much is the force?

zinc aspen
#

inf

#

the max force

thorny tapir
#

Weird

zinc aspen
#

wait

#

it works when i open a server

#

and try it

#

but nto when i test in roblox

#

and it doesnt work for non player characters

#

probably

#

as long as it works in the server ig its fine atleast ill try fix it tomorrow thanks for helping guys