How to make FPS arms in Roblox Studio | V2

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 100

  • @sqood652
    @sqood652  3 місяці тому +5

    THANK YOU ALL SO MUCH FOR 100 SUBS! I'll try to respond to all of your comments and give help/feedback to everyone who needs it. Write your issues in the comments and I'll help!

    • @Blacky8111
      @Blacky8111 2 місяці тому

      Please help

    • @Blacky8111
      @Blacky8111 Місяць тому

      Hey I had recently discovered that my gun doesn't do any damage. Please help, Thanks

  • @jlboss_ps4751
    @jlboss_ps4751 2 місяці тому +4

    YK its hard being a scripter when u need a plugin for motivational texts.

  • @rman_n
    @rman_n 2 місяці тому

    Icl you are very underrated bro, please continute this!
    Edit: Everything works btw

    • @sqood652
      @sqood652  2 місяці тому +1

      @@rman_n thank you🙏 im glad everything works

    • @aungkaungkhant7554
      @aungkaungkhant7554 2 місяці тому

      @@sqood652It didn’t kill the dummy

  • @Darryl-mi2zx
    @Darryl-mi2zx Місяць тому

    Good tutorial. Thank you.

  • @TheCoolScribbleOFC
    @TheCoolScribbleOFC 3 місяці тому +3

    naaahh thank ya bro really
    ill follow the tutorial

  • @SwagZen-qi8gl
    @SwagZen-qi8gl 2 місяці тому

    damn make a video on about that math things, thats actually cool

  • @FernandoDumancela
    @FernandoDumancela 3 місяці тому +1

    First

  • @nullagoat
    @nullagoat 21 годину тому

    yo yo where is that pistol model

  • @Stickz_YT
    @Stickz_YT 18 днів тому

    Moon Animator doesn't recognise the viewmodel as a rig can you help me? EDIT: nvm I figured out the issue

  • @rman_n
    @rman_n 2 місяці тому

    Hey I was wondering if there would be a recoil system in next tutorial? If not totally fine! good stuff

    • @sqood652
      @sqood652  2 місяці тому +1

      @@rman_n love the idea! this actually isnt too hard so ill add it to the next tutorial

    • @rman_n
      @rman_n 2 місяці тому

      @@sqood652 Alright no problem! looking forward to it

  • @SomeRandomPTFan
    @SomeRandomPTFan 2 місяці тому

    can you make a tut with blender animation instead of moon cuz i dont have 20 dollars

  • @ItsSnowi3
    @ItsSnowi3 Місяць тому

    how do i fix the viewmodel not showing up when i press two and its not giving me errors when i press one its not telling me anything

  • @TheCoolScribbleOFC
    @TheCoolScribbleOFC 2 місяці тому +1

    yo, my camera is bugged

    • @TheCoolScribbleOFC
      @TheCoolScribbleOFC 2 місяці тому +1

      my viewmodel is for a flashlight, so the script is kinda short

    • @sqood652
      @sqood652  2 місяці тому +1

      can i see the script?

    • @TheCoolScribbleOFC
      @TheCoolScribbleOFC 2 місяці тому

      Alright

    • @TheCoolScribbleOFC
      @TheCoolScribbleOFC 2 місяці тому

      Hold on

    • @TheCoolScribbleOFC
      @TheCoolScribbleOFC 2 місяці тому

      local Runservice = game:GetService("RunService")
      local uis = game:GetService("UserInputService")
      local player = game.Players.LocalPlayer
      local character = player.Character or player.CharacterAdded:Wait()
      local camera = workspace.CurrentCamera
      local mouse = player:GetMouse()
      local viewmodel = game.ReplicatedStorage.Viewmodel
      local currentVM = nil
      local idle = true
      local walking = false
      local loadedAnims = {
      idle = nil,
      walking = nil
      }
      local swaycf = CFrame.new()
      local lastcameracf = CFrame.new()
      local sound = workspace["Flashlight Switch Plastic Slides On Off 15 (SFX)"]
      local function loadSlot(weapon)
      if weapon then
      if camera:FindFirstChildWhichIsA("Model") then
      camera:FindFirstChildWhichIsA("Model"):Destroy()
      currentVM = nil
      end
      local newVM = viewmodel:Clone()
      newVM.Parent = camera
      currentVM = newVM
      sound:Play()
      --loading animations
      loadedAnims.idle = newVM.Humanoid:LoadAnimation(newVM.Animations.Idle)
      loadedAnims.walking = newVM.Humanoid:LoadAnimation(newVM.Animations.Walk)
      end
      end
      Runservice.RenderStepped:Connect(function()
      if character then
      if currentVM then
      local rot = camera.CFrame:ToObjectSpace(lastcameracf)
      local x,y,z = rot:ToOrientation()
      swaycf = swaycf:Lerp(CFrame.Angles(math.sin(x) * 0.7, math.sin(y) * 0.7, 0), 0.1)
      lastcameracf = camera.CFrame

      local bobx
      local boby

      if walking then
      bobx = math.sin(time(0) * 9)/20
      boby = math.cos(time(0) * 8 * 2)/20
      elseif idle then
      bobx = math.sin(time() * .75)/120
      boby = math.cos(time() * .75 * 2)/120
      end

      local finalbob = CFrame.new(bobx, boby, 0)
      currentVM:SetPrimaryPartCFrame(camera.CFrame * swaycf * finalbob)
      end
      end
      end)
      character.Humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
      if currentVM then
      if character.Humanoid.MoveDirection.Magnitude > 0 then
      walking = true
      idle = false
      end
      if character.Humanoid.MoveDirection.Magnitude == 0 then
      walking = false
      idle = true
      end
      end
      end)
      uis.InputBegan:Connect(function(input, gamepro)
      if gamepro then return end
      if input.KeyCode == Enum.KeyCode.F then
      loadSlot(viewmodel)
      else
      if input.KeyCode == Enum.KeyCode.R then
      if currentVM then
      currentVM:Destroy()
      currentVM = nil
      sound:Play()
      end
      end
      end
      end)

  • @TheRealOvenRoasted
    @TheRealOvenRoasted 2 місяці тому

    Could you make a tutorial on how to make these weapons tool-based? Thanks!

    • @sqood652
      @sqood652  2 місяці тому

      this should be easy! all you need to do is hook up a tool to the equip system. if you need help i might be able to help make a small change in your code for you!

    • @TheRealOvenRoasted
      @TheRealOvenRoasted 2 місяці тому

      @@sqood652yes, that would be very helpful!

    • @TheRealOvenRoasted
      @TheRealOvenRoasted 2 місяці тому

      @@sqood652 how do i do that

    • @sqood652
      @sqood652  2 місяці тому

      @@TheRealOvenRoasted shoot!! i forgot about this😭😭 ill start working on the changed rn

    • @TheRealOvenRoasted
      @TheRealOvenRoasted 2 місяці тому

      @@sqood652 lol its alright

  • @RavenDescent
    @RavenDescent 2 місяці тому +1

    How would you add bullet effects?

    • @rman_n
      @rman_n 2 місяці тому

      I think that will be added in another tutorial

    • @RavenDescent
      @RavenDescent 2 місяці тому

      @@rman_n alright

  • @YTROKARLOLFANCLUB
    @YTROKARLOLFANCLUB 2 місяці тому

    Pls make part 2

  • @RigidDecay
    @RigidDecay Місяць тому

    whenever the character dies, the view model lays on the floor and does not get deleted, do you know why?

    • @bbhoosnse7148
      @bbhoosnse7148 Місяць тому

      why?

    • @RigidDecay
      @RigidDecay Місяць тому

      @@bbhoosnse7148 it was actually a problem with my camera getting disconnected from the player model.

  • @slayrz
    @slayrz 2 місяці тому

    my fullauto if i just do one click it just starts shooting without me clicking.
    The rest works btw thx!

    • @sqood652
      @sqood652  2 місяці тому

      make sure you turn off your full auto bool value when u let go of left click

  • @RBLXRigAnim_official
    @RBLXRigAnim_official Місяць тому

    Why does he have less than a mil subs

  • @Retro_qe0982
    @Retro_qe0982 3 місяці тому

    yoo can you make more features like changing weapon and a ui?

    • @sqood652
      @sqood652  3 місяці тому +1

      maybe next tutorial!

    • @Retro_qe0982
      @Retro_qe0982 3 місяці тому

      @@sqood652 ok i can't wait for the next tutorial

    • @rman_n
      @rman_n 2 місяці тому

      @@sqood652 Please do make it!!!

  • @Retro_qe0982
    @Retro_qe0982 3 місяці тому +1

    wait can the server see how the client is holding the gun?

    • @sqood652
      @sqood652  3 місяці тому

      no they cant. if you want, ill add that into the next tutorial

    • @Retro_qe0982
      @Retro_qe0982 3 місяці тому

      @@sqood652 alright

  • @emxzxs
    @emxzxs 3 місяці тому

    hi sean!!

  • @DOOM-mm6hq
    @DOOM-mm6hq 2 місяці тому

    This script works just as expected and it looks awesome! I have just one issue. How can I make it so that you can see other's viewmodels?

    • @sqood652
      @sqood652  2 місяці тому

      @@DOOM-mm6hq ill have that working in the next tutorial! stay tuned

    • @sqood652
      @sqood652  2 місяці тому

      im glad everything work as it should :)

  • @Retro_qe0982
    @Retro_qe0982 2 місяці тому

    when u upload next gun tutorial lol

    • @sqood652
      @sqood652  2 місяці тому +1

      in a bit 😭 im working on a devlog rn

    • @Retro_qe0982
      @Retro_qe0982 2 місяці тому

      @@sqood652 oh didn't realize lol! My bad

    • @sqood652
      @sqood652  2 місяці тому

      @@Retro_qe0982 nah ur good u didnt know

    • @Retro_qe0982
      @Retro_qe0982 2 місяці тому

      @@sqood652 if u will make an ep3 for this can u do the bug fixes on that part?

    • @sqood652
      @sqood652  2 місяці тому

      @@Retro_qe0982 gotchu

  • @Blacky8111
    @Blacky8111 2 місяці тому

    I don't know why I'm encountering this problem but after I added canshoot = true I still can't shoot the gun after the first, please help

    • @sqood652
      @sqood652  2 місяці тому

      @@Blacky8111 make sure you have canshoot enabled when u try shooting

    • @Blacky8111
      @Blacky8111 2 місяці тому

      Okay

    • @Blacky8111
      @Blacky8111 2 місяці тому

      Just got it to work, there was a problem with the spread function

    • @Blacky8111
      @Blacky8111 2 місяці тому

      Only problem is my gun doesn’t do damage

    • @Blacky8111
      @Blacky8111 2 місяці тому

      Great tutorial, as an intermediate scripter I can hardly remember all the objects and commands. Thanks

  • @aquzr5630
    @aquzr5630 2 місяці тому

    for me the model that i am using is not being animated... I made the Bolt a motor 6d, but it is not working in Moon Animator.

    • @sqood652
      @sqood652  2 місяці тому

      @@aquzr5630 is it anchored? make sure it isnt!

    • @aquzr5630
      @aquzr5630 2 місяці тому

      @@sqood652 the gun isn't anchored

    • @aquzr5630
      @aquzr5630 2 місяці тому

      @@sqood652 it is anchored

    • @sqood652
      @sqood652  2 місяці тому

      @@aquzr5630 😭😭if it still doesnt work then make sure your making the part 1 of the motor 6d the handle of the gun and u should be all set :)

    • @aquzr5630
      @aquzr5630 2 місяці тому

      @@sqood652 what do you mean?

  • @Chicken-t8d
    @Chicken-t8d 14 днів тому

    please someone give me the script i been working on this shi# for a week now its still not working

  • @Helloiamisbruhpro
    @Helloiamisbruhpro 2 місяці тому +1

    bruh i so lazy to do code
    i need copy

  • @D3CST
    @D3CST 2 місяці тому +1

    my script does not work here it is
    local RunService = game:GetService("RunService")
    local UserInputService = game:GetService("UserInputService")
    local player = game.Players.LocalPlayer
    local character = player.Character or player.Character:Wait()
    local camera = workspace.CurrentCamera
    local mouse = player:GetMouse()
    local viewmodel = game.ReplicatedStorage.ViewModels
    local currentVM = nil
    local idle = true
    local walking = true
    local shooting = false
    local fullautoshooting = false
    local inair = false
    local canshoot = true
    local can reload = true
    local reloading = false
    local loadedanims = {
    shoot = nil
    reload = nil
    inspect = nil
    }
    local inventory {
    primary ""
    secondary "Deagle"
    knife ""
    module = nil
    }
    local swaycf = CFrame.new()
    local lastcameracf = CFrame.new()
    local function cancelreload()

    end
    local function loadslot()
    if weapon then
    if camera:FindFirstChild("Model") then
    currentVM:Destroy()
    currentVM = nil
    end
    if not viewmodel:FindFirstChild(weapon) then warn("cant find wepon in folder") return end
    local newVm = viewmodel:FindFirstChild(weapon):Clone()
    newVm.Parent = camera
    currentVM = newVm
    inventory.module = require(currentVM.Module)

    loadedanims.shoot = newVm.Humanoid:loadanimation(newVm.Animations.Shoot)
    loadedanims.reload = newVm.Humanoid:loadanimation(newVm.Animations.reload)
    loadedanims.inspect = newVm.Humanoid:loadanimation(newVm.Animations.Inpect)

    end

    end
    local function reload()

    end
    local function spread()

    end
    local function shoot()

    end
    RunService.RenderStepped:Connect(function()
    if check character then
    if cameraVM then
    local rot = camera.CFrame:ToObjectSpace(lastcameracf)
    local x,y,z = rot:ToOrientation()

    swaycf:Lerp(CFrame.Angles(math.sin(x) * 3, 0), 0.05)

    local bobx
    local boby

    if walking and not inair then
    bobx = math.sin(time() * 7.5)/20
    boby = math.cos(time() * 7.5 * 2)/20
    elseif idle and not inair then
    bobx = math.sin(time() * 7.5)/120
    boby = math.cos(time() * 7.5 * 2)/120
    elseif inair then
    bobx = 0
    boby = 0
    end

    local Cframebob = CFrame.new(bobx, boby, 0)
    currentVM:SetPrimaryPartCframe(camera.CFrame * swaycf * Cframebob)
    end
    end
    end)
    UserInputService.InputBegan:Connect(function(input, gamepro))
    if gamepro then return end
    if input.KeyCode == Enum.KeyCode.One then
    loadslot(inventory.primary)
    end
    UserInputService.InputBegan:Connect(function(input, gamepro))
    if gamepro then return end
    if input.KeyCode == Enum.KeyCode.Two then
    loadslot(inventory.secondary)
    end

    • @sqood652
      @sqood652  2 місяці тому

      @@D3CST what part doesnt work? it might be because you forgot to do an equal in the inventory for your weapons.

    • @D3CST
      @D3CST 2 місяці тому

      @@sqood652 what do you mean

    • @sqood652
      @sqood652  2 місяці тому

      @@D3CST under the inventory table, it says primary "". did you forget the equal sign?

    • @D3CST
      @D3CST 2 місяці тому

      @@sqood652 oh where

    • @sqood652
      @sqood652  2 місяці тому

      @@D3CST the inventory