Hello, the title says it all. I can’t exactly get a video of this from my computer, but I can link my game for you guys to see.
My exact issue was also posted here, but no one really had a solution.
My game where the issue can be seen:
To see what I mean, equip the knife. Next, click and hold to enter the throwing animation. Release once the animation has started and you should notice that the knife that was thrown hovers for a moment and then moves foward. I will try to edit this post to get a video of what I mean.
My throwing code:
local throwingHandle = handle:Clone()
throwingHandle.Velocity = (target - throwingHandle.CFrame.p).unit * 100
-- set the orientation to the direction it is being thrown in
throwingHandle.CFrame = CFrame.new(throwingHandle.CFrame.p, throwingHandle.CFrame.p + throwingHandle.Velocity) * CFrame.Angles(0, 0, math.rad(-90))
local floatingForce = Instance.new('BodyForce', throwingHandle)
floatingForce.force = Vector3.new(0, 196.2 * throwingHandle:GetMass() * 0.98, 0)
local spin = Instance.new('BodyAngularVelocity', throwingHandle)
spin.angularvelocity = throwingHandle.CFrame:vectorToWorldSpace(Vector3.new(0, -200, 0))
throwingHandle.Parent = workspace
game.Debris:AddItem(throwingHandle,5)
EDIT: I managed to record a video.
If you want to see the knife stutter in air, look at about 0:03 in the clip.
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.
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
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.
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)