It is one part, with a simple mesh in it. I should add that the extra knife is created by a server script.
Try doing:
throwingHandle:SetNetworkOwner(nil)
Might have to do with network ownership, that’s usually why things stutter as they move away from a player
Now my knife won’t even throw or appear… there is an error.
Can only call Network Ownership API on a part that is a descendent of Workspace
Oh, the script is in a local script?
Yep it’s probably a networking issue, when you create a new projectile on the server it takes time hence a delay for the instances to replicate from the top down model hence lag.
To solve this create the projectile before hand using nexus avengers buffer method wrapped by bombsrain in this module.
That just means you set the network owner of the knife before setting the parent of the knife to the workspace.
Nope. I have a server script that requires a module based on the player’s knife effect. In this case, I just want to fix it for the default knife effect.
(Heres how it is set up: Knife Tool > Server Script > A bunch of module scripts
Can I see the how the hierarchy looks like in the explorer tab?
I set it to workspace before I set the ownership, yet I still get that error.
local throwingHandle = handle:Clone()
throwingHandle.Parent = workspace
throwingHandle:SetNetworkOwner(nil)
Just to give you a tip, that error means the API only allows the server to take control of the part’s physics if only that part is either a children or descendant of workspace.
Where was the tool parented to?
Workspace?
local throwingHandle = handle:Clone()
throwingHandle.Parent = workspace
throwingHandle:SetNetworkOwner(nil)
Where is this block of code located? I think it’s running before the tool is even parented to whatever player.
Its in a module script labeled Default
in the image I sent earlier. Here is the code that requires that module.
script.Parent.Events.Throw.OnServerEvent:Connect(function(player,target,cframe)
if db.Value == false then
db.Value = true
local effect = script.Parent.Values.Effect
require(script[effect.Value]).Throw(player,target,cframe,script.Parent.Handle,script.Parent.Effects)
wait(cooldown)
db.Value = false
end
end)
Playtest your game, hold out the tool, and see if it’s inside your character model.
Alright, I just playtested. Here is what I did:
I held out the tool — It is in my character.
I disabled the :SetNetworkOwner(nil) temporarily so I can throw a projectile without it erroring and not throwing anything at all.
When I throw the knife, the new projectile is parented to workspace, not my character.
Maybe try to use that function WHEN the new projectile is in throwing?
Wdym? Should I set the NetworkOwner after I add the body forces and such?