#how would i simulate a bullet in roblox studio
1 messages · Page 1 of 1 (latest)
** You are now Level 4! **
there are several ways
this is rudimentary but create a small part in front of the gun, call it barrel, then create the bullet that spawns on the barrel then tween it while calculating the distance from barrel position to mouse target to get an accurate speed on bullet travel
no don't tween it
wtf
i just assumed, never worked with a gun system before
serverside tweens are really bad for replication
the best way would be to simulate the bullet on the server and make the visuals for it on the client
with raycasts/spherecasts
how would i simulate the visuals to match with the bullet
yk how a bullet moves
how would i make the visuals match with the bullet
if the bullet travels in a straight line at a set speed then it's very easy
start position + velocity * (currenttime - starttime)
thats the position
is there a way where i can simulate the raycast to be moving like a bullet?
well idk
Cartoonish way but
Get a gun
Make a part called "bulletStartPoint" (transparent, anchored, not collidable) which is in front of the barrel where the bullet would leave out of the gun
** You are now Level 6! **
That's your bullet start point
Then you can just make it a thin skinny part that appears and disappears every 0.1s
dont give advice then
are u trying to be sped on purpose
I said cartoon brochacho
Stop rage baiting