Hey all, so I had a look in ~ FastCast and while the module looks an extremely robust, the does it seems ~ a bit fancy for my needs. Even right now trying to set it up, it returns my totality game by just requiring the module probably something to a recent update to the module.

You are watching: How do you throw the knife in roblox

Knife throw isn’t main to mine game, and also most capability the player has actually are close range melee, I just need some ideas on how to set something increase that in reality works and also isn’t too complicated/overkill.

thanks for any kind of advice or ideas!


There’s alot of methods to execute this,one would be v velocity but i do not introduce such, together you’d have to manipulate network ownerships i m sorry would turns out as well overcomplicated.You could try using tween or lerp come interpolate the knife position in the wanted target,tween would be easier but i personally favor lerp therefore you have to go because that that.


I will certainly be relocating the knife for visual results on all clients and also moving a hitbox there is no the yes, really knife design on the server for hit detection. At the very least that the non-FastCast arrangement so far.

I am thinking bodymovers could be a an excellent idea though, since tweening ~ above the server and the clients can not be the best plan.


One method is you can use Mouse button down and also get the mouse hit place you can also use tick on just how long they host the button, fire one event. Climate on server gain the event and use body velocity or vector pressure if you want it to glide.


I recognize you didn’t want to usage FastCast, yet I’d suggest looking into it a bit. It’s no that bad to setup, and also would work-related for knife throwing, melee hit detection, and also of course weapons as well.

Moving parts, .Touched, collisions in general, are all really inconsistent. The main benefit of raycasting is just the dependability of it.


I post on the FastCast thread and also it right now seems to be bugged as result of Luau and also other functions I not need. As it is, ns can’t use it at all.

I’m worried the module is ending up being over attribute filled and also is consisting of so many new things because that every edge situation imaginable.

It also requires me to creat simply one Caster object because that each player and also leaves the responsibility of clean these up to me once the player leaves. It was recommended that ns creat the Caster object with a regional script, yet this is forcing a paradigm contrary to my entire framework best now.

That’s why ns here, that doesn’t work right now, the including means more features and complexity than I need, and also it’s making my setup an ext of a pain 보다 it must be.

As a note, i’m thinking around using the RayCastHiitbox module instead, simply haven’t satisfied exactly how I will certainly sync server and customer projectiles

Please pardon typos on i’m my phone


I am hope someone right here can help with an idea regarding this. I just tried setting up FastCast and again, no offense to the creator of the module, yet its simply overly complex and the noted example pistol is additionally also complete of so lot extra stuff, picking it every apart is extremely difficult. I get errors native FastCast that have actually no infomration on just how to fix them.

I am not a start programmer by any kind of means, yet I am simply finding this so daunting to use.

I really simply need to move a hitbox on the server and also keep that synced top top the clients, is over there anything the end there that can help me perform this?


Create the actual, invisible projectile on the server, relocate it with a bodyvelocity and collection the networkowner that it to nil

Have the server send a signal to various other clients to produce a visual it is synched to the flightpath that the server-generated bullet (except your own, your customer should create the effect instantly before informing the server friend threw a knife)

Rig increase touched occasions on both the server knife and also the visual knife; instantly trust hits shown by the server, however check versus the position of hits confirmed by the client

simple as can be


sounds prefer what I want to perform originally before going down the FastCast hare hole. Again no dislike on FastCast I’m sure its robust collection of features really fit the needs of some people.

I have currently a nice solid system for act logical stuff on server and also rendering effects on the client. While many of my game deals with melee abilities i am at the suggest of including in a couple of projectiles such together knife throw and/or other slower moving, non-bullet type projectiles.

In your suggestion here on #2, how do you propose syncing what ~ above the server and also client? i have no trouble generating and also moving invisible hitboxes top top the server and cosmetic projectiles on each client, but how perform i get them to stay sensibly synced? ns don’t need perfect, simply good.

See more: How Much Is A 1873 Trade Dollar Worth, Us Trade Dollars (1873


People often tend to say the touched events are unreliable and also inconsistent but we’re utilizing them for a notably big project that ours and also they remain 100% constant serverside approximately speeds of around 700 - 800 studs per second and magnificently higher from the client - and also under normal scenarios our projectiles are maybe about a tenth of the speed

Fastcast is intended for people that want to simulate physics-based projectiles there is no actually making use of physics, an interpretation they’re probably working with speedy bullets and should probably just progress to hitscan anyway

As much as synching goes, every you need is to recognize the mean transfer speed of client-to-server signal (aka determine the player’s ping) to see just how much time transpires in between the customer sending the signal and the other clients receiving it - then you simply move the visual from the shot’s origin based on the bullet’s take trip speed and the elapsed time - simple math


Yeah, i agree I’m not concerned about using Touched event or I might use the RayCastHitbox module which ns have currently setup in my game for various other purposes.

How space you identify a player ping and they just how are you utilizing this to impact the take trip speeds? I might sue some aid with this

*

this would be a an excellent module! something simple to sync hitboxes


The many barebones way of doing the is:

Client fires a remote v its present tick()

-- Clientgame.ReplicatedStorage.Ping:FireServer(tick())Server receive signal, compare the send time to its very own tick()

--- Serverlocal Pings = game.ReplicatedStorage.Ping.OnServerEvent:Connect(player, sent) local difference = (tick() - sent) neighborhood MS = math.ceil(difference/10) -- gamings tend to display screen ping in millisecond Pings = MSend)I made decision to save the value in a table yet you might put the in a NumberValue if you wanted both ends to check out the value, and you might if you setup to have actually a ping display

BodyVelocity speeds are expressed in studs every second, and your ping is express in milliseconds, therefore it’s a straightforward conversion