![]() ![]() Then the server will tell all clients (except you) to cast a bullet.įirst let’s make a remote event. Step 5: Bullet replicationīasically the concept it, when we fire a bullet it will tell the server that we casted a bullet. ![]() Honestly you can stop reading the tutorial here, but let’s make bullet replication so other players can see the bullets. You can make it so an impact sound plays or make bullet holes, but I’m just going destroy the bullet nothing fancy. Basically we will disconnect the loop then destroy the bullet. devforum-uploads.s3./uploads/original/4X/8/5b9a1081e9a503493f8d5ae19c31855b6e32.mp4Īlright time to put some code on the else statement. After that we’re gonna update the spring: local UpdatedRecoilSpring = RecoilSpring:update(dt). Then in the MainModule, we’re going to make a param for the RecoilSpring. So let’s pass in RecoilSpring as a parameter So instead of creating a new RenderStepped we can just use the existing one. Now we’re going to update the spring, so we will need to update it every frame. So now with this variable we’re going to do RecoilSpring:shove(Vector3.new(1, 0, 0) every time the gun fires, you can change the 1 to any number you like. So first let’s create a new spring function This might get confusing but if you understand how it works it’ll be easy. Spring:shove(Vector3.new()) (sets the goal of the spring)Īlright so the concept is when the guns shoots we want to shove the spring.SpringModule.new() (creates a new spring function, btw you can put params into the brackets but I just put them as default).We will be using 3 functions from the SpringModule: ![]() When your done downloading the spring module, put the module inside ReplicatedStorage and require it in LocalHandler. We’re going to use this SpringModule.rbxm (1.3 KB) to make recoil, bobble and swaying. here is the editted version:īefore continuing, you need to have some knowledge on: So in the projectile module I forgot to put local Loop and dt * 60. ![]() (also sorry if it’s a bit complex and confusing for some people, tried explain it as much as I can) Objectives: If you just came, you’ll have to first see the original post to continue else it might get confusing for you, check it out here.Īlso this tutorial is a bit long might take you a day or two to complete this. Well you guys seemed to like the tutorial so heres a Part 2. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |