Sorry I didn’t find the answer so far (saw a lot of problem with assemble linear velocity, but nothing for me)
On a server script, I’m able to add a LinearVelocity on a player character and move it this way. But it doesnt replicate for other clients by default.
I was wondering if Assembly Linear Velocity could do it, but I didn’t sucees so far. Is it impossible? Do I have to replicate the LinearVelocity on all the clients ?
In both cases I set the networkownership of all descendants of the chracter to nil (but that could
local function setNetworkOwner(part)
if part:IsA("BasePart") then
part:SetNetworkOwner(nil) -- Set the network owner to the server
end
end
I hear about assembly ownership, but couldn’t find anything on it.
With LinearVelocity :
local direction = player.Character.HumanoidRootPart.CFrame.lookVector * 50
local oldSpeed = player.Character.Humanoid.WalkSpeed
player.Character.Humanoid.WalkSpeed = 0
local velocity = Instance.new("LinearVelocity")
velocity.Attachment0 = player.Character.HumanoidRootPart.RootAttachment
velocity.VectorVelocity = direction
velocity.ForceLimitsEnabled = false
velocity.Parent = player.Character.HumanoidRootPart
wait(0.2)
velocity.VectorVelocity = Vector3.zero
velocity:Remove()
player.Character.Humanoid.WalkSpeed = oldSpeed
With AssemblyLinearVelocity :
local direction = player.Character.HumanoidRootPart.CFrame.lookVector * 50
local oldSpeed = player.Character.Humanoid.WalkSpeed
player.Character.Humanoid.WalkSpeed = 0
print(direction)
local delay = 0.2
while delay > 0 do
--player.Character.Humanoid.PlatformStand = true
player.Character.HumanoidRootPart.AssemblyLinearVelocity = direction * 10
delay -= 0.01
wait(0.01)
end
player.Character.Humanoid.WalkSpeed = oldSpeed
I won’t keep the code ofc, it’s just for test.
If I remmeber correctly, it’s working fine with the move function, but I can’t use it.