How To Make a Tool Dedicated VIEW MODEL in Roblox Studio | Roblox Studio Tutorials

Поділитися
Вставка
  • Опубліковано 2 січ 2025

КОМЕНТАРІ • 294

  • @StuffyDev
    @StuffyDev  8 місяців тому +25

    For those of you that are having script issues or other issues, and can't figure it out yourself or the video doesn't help (somehow), then you can use the model below. Don't just blindly copy and paste the viewmodel, try recreating the viewmodel yourself using the video or else you won't learn anything and won't be able to expand on the viewmodel.
    create.roblox.com/store/asset/16897515665/FPS-ViewModel-by-StuffyDev

    • @JupiterDo0vid
      @JupiterDo0vid 8 місяців тому

      Thanks!

    • @Martial21396
      @Martial21396 8 місяців тому +1

      Where do i have to put the view model for it to work? Because when i spawn in it doesn't work.

    • @Martial21396
      @Martial21396 8 місяців тому

      also i can't find the gin kit anymore

    • @darkbard7
      @darkbard7 8 місяців тому

      i think ppl didnt weld the gun to the viewmodel

    • @MercedesBenzOver-dk1ls
      @MercedesBenzOver-dk1ls 6 місяців тому

      I already knew how to create a ViewModel like this i just wanted you to explain the math behind the ViewModel instead of just saying "we are just gonna do a bunch of math"

  • @NebulaAccount
    @NebulaAccount 9 місяців тому +10

    truly an underrated channel

  • @the_voices_wont_stop
    @the_voices_wont_stop 9 місяців тому +14

    bro when i saw you had a channel with programing tutorials i was not expecting to get lua flashbacks

  • @Viunly
    @Viunly 7 місяців тому +1

    i just want to say thank you, ive tried so many other videos that dont work, and this one actually works, keep up the good work

    • @niksiisieki
      @niksiisieki 6 місяців тому

      ye but other players cant see the gun

    • @Viunly
      @Viunly 6 місяців тому

      @@niksiisieki u can probably look up another video for that problem

    • @niksiisieki
      @niksiisieki 6 місяців тому

      @@Viunly nah nvm i js used fe gun kit

  • @Tophattttttt
    @Tophattttttt 3 дні тому +2

    OMG IT WORKED!
    i thought why does viewmodel doesn't apear?
    Its easy
    1.Check if code is correct
    2.Check if your viewmodel is named correctly and in code is a correct name of viewmodel like: in code is ViewModel but the model named Viewmodel

  • @sNIXerBars2009
    @sNIXerBars2009 6 місяців тому +13

    To simplify the FP (First Person) script you can say
    "local player = game.Players.LocalPlayer
    player.CameraMode = 1"
    instead of that

    • @Ash_Can0706
      @Ash_Can0706 4 місяці тому

      imo its better to just change the properties in "StarterPlayer"
      it just saves on a script

    • @UltraGamer5543-zc2gf
      @UltraGamer5543-zc2gf 4 місяці тому

      I don't even know why we needed a script for the FP go to starter player and change the camera mode
      It is easier.

    • @Ash_Can0706
      @Ash_Can0706 4 місяці тому +1

      @@UltraGamer5543-zc2gf I said the same thing, but scripts are useful whenever you want to switch their camera on command rather than whenever they join the game.

  • @beezle18397
    @beezle18397 5 місяців тому +29

    FOR ANYONE WHO WANTS THE FULL SCRIPT:
    local tool = script.Parent
    local player = game.Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local Camera = workspace.CurrentCamera
    local RunService = game:GetService("RunService")
    local ViewModel
    local equipped = false
    tool.Equipped:Connect(function()
    equipped = true
    game.ReplicatedStorage.ViewModel:Clone().Parent = Camera
    end)
    tool.Unequipped:Connect(function()
    equipped = false
    ViewModel = Camera:FindFirstChild("ViewModel")
    if ViewModel then
    ViewModel:Destroy()
    end
    end)
    local swayCF = CFrame.new()
    RunService.RenderStepped:Connect(function()
    if player.Character.Humanoid.Health

    • @maxfurbabuni
      @maxfurbabuni 4 місяці тому +1

      you forgot to add this line under :
      local RunService = game:GetService("RunService")
      this goes under the line of code i have showed you:
      local uis = game:getservice("userInputservice")

    • @IncreasIlI
      @IncreasIlI 4 місяці тому

      @@maxfurbabuni capitals are important, its supposed to be, "GetService," and "UserInputService"

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

      Thank my laziness couldn’t deal with this

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

      @@gamingwithbros887 did it work for u?
      for me no

    • @Bloxxerboi1
      @Bloxxerboi1 17 днів тому

      @@idkwhattoputhere7826 same

  • @Boi-be2ni
    @Boi-be2ni Місяць тому

    I was trying to find gun models I could use and you saved me, thanks

  • @OSFlames
    @OSFlames 5 місяців тому +2

    People out there, i recommend you to put a humanoid in the Viewmodel because it just makes you're arms smoother which makes you viewmodel look 10x better. No problem!
    Another solution, I had trouble with this one to but, if it does not appear but appears in the workspace then just get the model and get the position original and copy and paste from the m4a1 and paste onto you’re guns model and hands. Np! People.

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

      what?
      i have this problem but i cant understand your comment

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

      @@Jdh2k10 just put it in your model thats it lol

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

      @@OSFlames man could you way it again? i have same problem but i cant undestand you too

  • @vulephamminh3421
    @vulephamminh3421 16 днів тому

    i've been searching for this vid for so long

  • @matrixgeg
    @matrixgeg 8 місяців тому +2

    this video helped me to make my first view model!!

  • @super-rocco
    @super-rocco 8 місяців тому +1

    it worked! tysm

  • @CAT.Entertainment_Off
    @CAT.Entertainment_Off 3 дні тому

    My item is a camera, and i want that the cam, if we click (use it), it make a VHS effect, is it possible?

  • @victor90ro86
    @victor90ro86 8 місяців тому

    under rated dev fr, ur amazing dude

  • @Assasin_K_C137
    @Assasin_K_C137 8 місяців тому

    Bro, u just got another subscriber, I have been looking for this

  • @pepper1043
    @pepper1043 7 місяців тому

    great tutorial and really good quality underated af

  • @JohnabnerAlayonjr
    @JohnabnerAlayonjr 5 місяців тому +1

    im having this trouble where when i equip the tool the viewmodel along with the gun doesnt appear and when the tools equipped it would dissapear completely from the players backpack

  • @mc_nourishment
    @mc_nourishment Місяць тому +1

    hey man how do we add animations? I want to make a shooting animation but it won't work.

  • @Jamazie
    @Jamazie 9 місяців тому

    IT WORKS OMG THANK YOU SO MUCH

  • @MohmmadFreefireGAMER
    @MohmmadFreefireGAMER 3 дні тому +1

    What's wrong? local tool = script. Parent
    local player = game. Players. LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local Camera = workspace. Camera
    local RunService = game:GetService("RunService")
    local uis = game:GetService("UserInputService")
    localViewModel
    local equipped = false
    tool.Equipped:Connect(function()
    equipped = true
    game.ReplicatedStorage.ViewModel:Clone().Parent = Camera
    end)
    tool.Unequipped:Connect(function()
    equipped = false
    ViewModel = Camera. ViewModel
    ViewModel:Destroy()
    end)
    local swayCF = CFrame.new()
    RunService.RenderStepped:Connect(function()
    if player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.Health

  • @TotoDevRBLX
    @TotoDevRBLX 7 місяців тому

    Thanks for the turorial. You helped me a lot!

  • @brandehhh2023
    @brandehhh2023 6 днів тому

    Dont work my left arm when I turn off collisions it makes the view model have no collisions

    • @StuffyDev
      @StuffyDev  6 днів тому

      there isnt anything that can be done with the viewmodel clipping, its just how its gonna have to be.

    • @brandehhh2023
      @brandehhh2023 5 днів тому

      @@StuffyDev alr got it

  • @haze42
    @haze42 8 місяців тому +4

    do you know or have ideas how to make sway work on mobile

    • @ObliviousNoob1
      @ObliviousNoob1 4 місяці тому

      It should work on all devices? Did you test yourself

    • @haze42
      @haze42 4 місяці тому

      @@ObliviousNoob1 I tested myself. MouseDelta is really bad with touchscreen

  • @EuropeanFootballClothes
    @EuropeanFootballClothes 19 днів тому

    I did exactly what you did but ehen I equip the Tool the Gun and veiemodel doesnt show up

  • @wirhly
    @wirhly 8 місяців тому +1

    for some reason when I equip it the sway works but It moves me in the air and I can't move but I can still look around, I tried to fix it but nothings working do you know what the issue could be

  • @JB_DEVb2
    @JB_DEVb2 4 місяці тому +1

    I did everything correctly and the first person code won’t work and the gun code won’t work either HELP

  • @predatt0rgoldsborough879
    @predatt0rgoldsborough879 15 днів тому

    you saved me omg thank you

  • @LazyLimeTF2
    @LazyLimeTF2 8 місяців тому +2

    Hey there I have a question, does the view model appear on just the players screen or does it show the model to people as well?

    • @StuffyDev
      @StuffyDev  8 місяців тому +3

      its only on the players screen, as its attached to their local camera

    • @LazyLimeTF2
      @LazyLimeTF2 8 місяців тому

      @@StuffyDev oh okay, thanks for the tutorial though👍

    • @bananajesus667
      @bananajesus667 6 місяців тому +1

      @@StuffyDev How should you create visuals for the other players?

    • @DontReallyKnow-O
      @DontReallyKnow-O 3 місяці тому

      @@bananajesus667 in a server side script maybe,

  • @greenqz22
    @greenqz22 8 місяців тому +2

    It works TYSM
    Will you do a part 2?

    • @niksiisieki
      @niksiisieki 6 місяців тому

      other ppl cant see the gun

    • @BoxGuy010
      @BoxGuy010 4 місяці тому

      @@niksiisieki im a new scripter and i just learned how to script/code in the last few months, and i made it so other people could see the gun i would probably share it to you all if it works in mobile (im still trying to make it work for mobile)

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

      @Jails284 cuz its client sided lol, it was made in a local script

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

      try doing a remote event or something like that to make this fire for the whole server not just the client, but i'm not sure if that will work

  • @navysimulatorcommunitycont6324
    @navysimulatorcommunitycont6324 6 місяців тому +1

    is there a way to make the ViewModel have the clothing and skin colour of the user?

    • @Levthedev1
      @Levthedev1 5 місяців тому

      Try putting a localscript in startercharacterscripts and try this,
      --name Clothing "Shirt"--
      workspace.Camera.ViewModel.Shirt.ShirtTemplate = game:GetService("Players").LocalPlayer.Character.Shirt.ShirtTemplate --or name of shirt--
      for skin colour i don't know. This is all i could help with.

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

    for some reason it always says "Equipped is not a valid member of backpack"

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

      check the script and when you see the code "local item = script.parent" remove one parent in the code thats similer to the one i showed you

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

    Is there a way you could add an equip animation?

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

    how to make multiple gun model work in the same inventory

  • @yoburoml1304
    @yoburoml1304 7 місяців тому +1

    so if i make another gun i need to copy the script and viewmodel?

  • @playing_coder
    @playing_coder 7 місяців тому

    Thanks you for tutorial of roblox studio. You helped me with guns, cause it is a lot of broken or none working guns in toolbox. I'm creating a new game as same as RDR 2. I hope, I wiil be in Rock Star Games. RDR 3 is my dream. More likes for you.

  • @milesring8262
    @milesring8262 6 місяців тому

    One little problem you need visuals for other players as the viewModel is only local sided and is not visible to other players.

    • @niksiisieki
      @niksiisieki 6 місяців тому

      what im saying do i put in normal script?

    • @DivineFoxx
      @DivineFoxx 5 місяців тому

      @@niksiisieki No - local scripts are the only ones able to access UserInputService. It'd error.

    • @niksiisieki
      @niksiisieki 5 місяців тому

      @@DivineFoxx nvm i used fe gun kit works so good

  • @sodanykrouk9148
    @sodanykrouk9148 4 дні тому

    I can’t get the sway tho

  • @PaxProductions.
    @PaxProductions. 8 місяців тому +1

    for the end of the script, i can't really see what it is saying. does it say "renderstopped".

    • @ytfox_roller5122
      @ytfox_roller5122 4 місяці тому

      Renderstepped. Renderstepped id something that fires before a frame starts.

  • @ChrismasMonke
    @ChrismasMonke 8 місяців тому +1

    can you do this but make the gun shot and do damage. If not, please make a tutorial for it. -Please and Thank you

    • @StuffyDev
      @StuffyDev  8 місяців тому +1

      already have a tutorial thats on my channel

    • @ChrismasMonke
      @ChrismasMonke 8 місяців тому +1

      @@StuffyDev Oh, sorry I am gonna watch that now.

    • @ChrismasMonke
      @ChrismasMonke 8 місяців тому +1

      @@StuffyDev And also there is a bug when you look down your player walks. Can you fix that?

  • @lucaniser
    @lucaniser 7 місяців тому +1

    I got a question my gun and viewmodel doesnt show or is still invisible whenever I equip the gun

    • @oliik_icy
      @oliik_icy 5 місяців тому

      did you add handle to your tool?

    • @ronaldoeditfie
      @ronaldoeditfie 5 місяців тому

      @@oliik_icy yes but it still doesnt work!

  • @Hiddenherpetologist
    @Hiddenherpetologist 8 місяців тому

    whenever i hold the tool nothing happens but the model just appears in its original spot and i dont get a viewmodel

    • @StuffyDev
      @StuffyDev  8 місяців тому

      that means you screwed up with setting the viewmodels position to the camera, check what your view models name is along with the code underneath the runservice function

    • @manemiswaa
      @manemiswaa 8 місяців тому

      @@StuffyDev I also have the same problem but I literally used the Tool and StarterPlayerScripts in the model you provided. I made my own ViewModel by following the video

    • @manemiswaa
      @manemiswaa 8 місяців тому

      The viewmodel provided works perfectly fine tho, not mine

    • @manemiswaa
      @manemiswaa 8 місяців тому

      I believe that the problem is because of renaming the ViewModel itself and/or changing the ViewModel in game.ReplicatedStorage.ViewModel:Clone().Parent = Camera

  • @-stars.and.raindrops-
    @-stars.and.raindrops- 4 місяці тому

    My viewmodel is facing the wrong way, can someone help me figure out the solution

  • @solevxii
    @solevxii 8 місяців тому

    I problem i have is that the viewmodel already shows up on screen without equipping the tool, I downloaded and used your model below and still have the same issue

    • @StuffyDev
      @StuffyDev  8 місяців тому +1

      if you used the model then its either you renamed something and then didn't update the scripts or you never ungrouped it from the folders, because I just tested the model and it works fine

    • @solevxii
      @solevxii 8 місяців тому

      @@StuffyDev Actually, I figured out the problem, I had a script from the last view mode; i had made with little experience and completely removed the old script and it works like a charm! Thank you

  • @Vaihly
    @Vaihly 6 місяців тому

    Is it possible to animate the viewport when i press the left mouse button?

  • @IcyCola-fb2xr
    @IcyCola-fb2xr Місяць тому

    is it ok if i use only a mesh as the gun?

  • @super-rocco
    @super-rocco 8 місяців тому +1

    is there a way to animate this using CFrame positions?

    • @StuffyDev
      @StuffyDev  8 місяців тому

      If you are talking about aim down sights then you can just create a transparent part near the aim part of the gun and then just align the camera to the part position. If you are talking about weapon firing and reload animation you are gonna have to use something like blender or moon animator
      I hope this is the answer you were looking for 😭

    • @super-rocco
      @super-rocco 8 місяців тому

      @@StuffyDev yes thanks!

  • @Helptheenviornment
    @Helptheenviornment 6 місяців тому +1

    Please help me @StuffyDev when my tool is unequipped I still see the arms and the gun and I looked over my code and everything is right. If you need pictures please let me know and I can send them to you

    • @niksiisieki
      @niksiisieki 6 місяців тому

      and other ppl cant see the gun

  • @apriceer9148
    @apriceer9148 3 дні тому

    for the first local script it is -> local tool = script.Parent
    local player = game.Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local Camera = workspace.CurrentCamera
    local RunService = game:GetService("RunService")
    local ViewModel
    local equipped = false
    tool.Equipped:Connect(function()
    equipped = true
    game.ReplicatedStorage.ViewModel:Clone().Parent = Camera
    end)
    tool.Unequipped:Connect(function()
    equipped = false
    ViewModel = Camera:FindFirstChild("ViewModel")
    if ViewModel then
    ViewModel:Destroy()
    end
    end)

  • @ebotics1231
    @ebotics1231 6 місяців тому

    can you please put the tool local script in like a pastebin its really hard to copy down

    • @StuffyDev
      @StuffyDev  6 місяців тому

      use the model in the pinned comment

    • @WaffleRBLOX
      @WaffleRBLOX 5 місяців тому +1

      @@StuffyDev thats not the script dumdum

  • @Nyusk_
    @Nyusk_ 8 місяців тому

    for me a random part just spawns when i use the gun and i cant walk cuz of the part

    • @DevKing_Phizo
      @DevKing_Phizo 8 місяців тому

      U did it wrong

    • @oliik_icy
      @oliik_icy 5 місяців тому

      make sure your handle isnt anchored

  • @Bloopet
    @Bloopet 9 місяців тому

    You should make a video on fist combat next 🙏

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

    Help me when I equip my gun and I'm starting fly

  • @Levthedev1
    @Levthedev1 5 місяців тому

    The viewmodel stayed at it's normal position, not at the camera, but i have wrote the script normally, what causes this?

    • @Levthedev1
      @Levthedev1 5 місяців тому

      Also, when i unequipped the gun stayed too.

    • @Levthedev1
      @Levthedev1 5 місяців тому

      Nevermind, i used R15

  • @PoldiVR
    @PoldiVR 5 місяців тому

    for me it creates on the beginning already an viewmodel

    • @PoldiVR
      @PoldiVR 5 місяців тому

      nevermind i had a another script for viewmodel

  • @BillyBeanCan
    @BillyBeanCan 6 місяців тому

    I have followed this step by step three times, and i still can't see the view model or gun

    • @oliik_icy
      @oliik_icy 5 місяців тому

      did you add handle to your tool?

    • @BillyBeanCan
      @BillyBeanCan 5 місяців тому

      @@oliik_icy that might be it, thanks

  • @bagabagacheegaa
    @bagabagacheegaa 6 місяців тому

    what do i do if it shows up but its not connected to me?

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

    I put the gun in starter pack, but when I equip it it shows up really far away and I can't use it. What did I do wrong?

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

      Try Checking If Any part Is Anchored

  • @CathalsYTChannel
    @CathalsYTChannel 5 місяців тому

    can you make a tutorial on how to make melee items?

  • @EclipseIsMe
    @EclipseIsMe 7 місяців тому +1

    Can you make it third person compatible?

    • @superduperbob
      @superduperbob 7 місяців тому

      no thats why there is only arms
      use your brain

    • @RawOpsis
      @RawOpsis 6 місяців тому

      @@superduperbob damn broskie don't have to be that rude💀

    • @superduperbob
      @superduperbob 6 місяців тому

      @@RawOpsis sorry im a christian now but i still agree😅

    • @RawOpsis
      @RawOpsis 6 місяців тому

      @@superduperbob 👍

  • @rblxcreations
    @rblxcreations 7 місяців тому +1

    when i equipped my gun it didnt show on the screen

    • @oliik_icy
      @oliik_icy 5 місяців тому

      did you add handle to your tool?

    • @rblxcreations
      @rblxcreations 5 місяців тому

      @@oliik_icy ye

  • @super-rocco
    @super-rocco 8 місяців тому

    i owe you so much!

  • @GDrakosha
    @GDrakosha 6 місяців тому

    I don’t know why but my gun and viewmodel is invisible every time i equip my gun

    • @StuffyDev
      @StuffyDev  6 місяців тому

      try using the model in the pinned comment

    • @hartenon
      @hartenon 6 місяців тому

      @@StuffyDev still doesn't work

  • @zbiki8325
    @zbiki8325 8 місяців тому +2

    2:32 (Just a reminder for me)

  • @ismaproductions5421
    @ismaproductions5421 8 місяців тому

    how do i make the third person tool invisible but visible to others

    • @gabrielferrara4924
      @gabrielferrara4924 5 місяців тому

      what do you mean? like you want the wiew model to be visible to others too?

  • @JogaradaGames
    @JogaradaGames 8 місяців тому

    hey, im having trobble with playing animations in the viewmodel, do you know how i could fix it?

  • @yoburoml1304
    @yoburoml1304 7 місяців тому

    how do i animate it like reloading and shooting

  • @_Swifty-
    @_Swifty- 5 місяців тому

    Hey I just finished making this and I noticed something and I’m wondering if there’s any way to fix it at all even but it clips through walls. Idk if it’s possible to fix it without completely deleting it and just adding an overlay but I just wanted ask that

    • @StuffyDev
      @StuffyDev  5 місяців тому

      It clips through walls due to CanCollide being turned off. Unfortunately I don't know of a way to make it so it doesn't clip through walls without screwing up the whole model, as if you turn CanCollide on it will mess with player movement.

    • @_Swifty-
      @_Swifty- 5 місяців тому

      @@StuffyDev ok thanks for responding!

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

    How to animate the viewmodel?

  • @OMARTHEREF541
    @OMARTHEREF541 8 місяців тому

    hi I'm having issues on the view model every time I equip the weapon it spawns at the place I created instead of in front of me I tried using your model scripts below but nothing is working. pls respond

    • @StuffyDev
      @StuffyDev  8 місяців тому

      if you used the model then its either you renamed something and then didn't update the scripts or you never ungrouped it from the folders, because I just tested the model and it works fine

    • @OMARTHEREF541
      @OMARTHEREF541 8 місяців тому

      @@StuffyDev thanks for replying ill see what it is thank you

    • @PokerRat
      @PokerRat 8 місяців тому

      @@OMARTHEREF541 Did you figure it out?

    • @OMARTHEREF541
      @OMARTHEREF541 8 місяців тому +1

      @@PokerRat Sadly no maybe it might the gun cause i uses a diff one

    • @PokerRat
      @PokerRat 8 місяців тому

      @@OMARTHEREF541 ah shoot same.

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

    How do I put aim mechanics in the gun?

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

      Script them

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

    It didn’t work I went back and checked everything and still did work the gun I used was a Glock from that gun pack

  • @_speedyhops8058
    @_speedyhops8058 7 місяців тому

    would you be able to animate this??

  • @FAGAME-pv4fl
    @FAGAME-pv4fl 9 місяців тому

    Good video bro you look like script teacher

  • @borbolic_bumpletistic2000
    @borbolic_bumpletistic2000 6 днів тому

    this is a modified version of the script so that the uis is userinputservice instead. this script fully works! enjoy :)
    local tool = script.Parent
    local player = game.Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local Camera = workspace.CurrentCamera
    local RunService = game:GetService("RunService")
    local ViewModel
    local equipped = false
    tool.Equipped:Connect(function()
    equipped = true
    game.ReplicatedStorage.ViewModel:Clone().Parent = Camera
    end)
    tool.Unequipped:Connect(function()
    equipped = false
    ViewModel = Camera:FindFirstChild("ViewModel")
    if ViewModel then
    ViewModel:Destroy()
    end
    end)
    local swayCF = CFrame.new()
    RunService.RenderStepped:Connect(function()
    if player.Character.Humanoid.Health

  • @bananajesus667
    @bananajesus667 6 місяців тому

    How do you create the server-side visuals to be seen by other players?

    • @niksiisieki
      @niksiisieki 6 місяців тому

      fr

    • @ryanphillips6335
      @ryanphillips6335 5 місяців тому

      What I did, was that I made a gun model and then I welded the gun's parts to the tool's handle. It looks a little weird with the player holding it like a candle but I think it's better then nothing

    • @niksiisieki
      @niksiisieki 5 місяців тому

      @ryanphillips6335 i got 2 options for u , u can use fe gun kit wich has viewmodels and yt tutorials or u can use a script i made but then have to add animation scripts but its kinda easy

    • @niksiisieki
      @niksiisieki 5 місяців тому

      @ryanphillips6335 but i would recommend fe gun kit its very customize able and easy to use has cool gun features and everything u can animate everything just from a model script using integers , booleans and strings

    • @ryanphillips6335
      @ryanphillips6335 5 місяців тому

      @@niksiisieki thats cool but I personally prefer to use a modified version of what StuffyDev has created

  • @FantasminElOriginal
    @FantasminElOriginal 7 місяців тому

    thank you very much bro

  • @GallonOfMilk3
    @GallonOfMilk3 6 місяців тому

    The model doesnt show up i take the tool but nothing

    • @oliik_icy
      @oliik_icy 5 місяців тому

      did you add handle to your tool?

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

    its not working can you make an video to fix the script

  • @JoelynElejorde
    @JoelynElejorde 6 місяців тому

    underated dev

  • @GGEZLLL
    @GGEZLLL 8 місяців тому

    how to make it so when your third person, your gun viewmodel is disabled and when I go first person, the viewmodel is enabled?

    • @DevKing_Phizo
      @DevKing_Phizo 8 місяців тому

      if player.CameraMode = 1 then put everything in this if loop

    • @GGEZLLL
      @GGEZLLL 8 місяців тому

      @@DevKing_Phizo when I do that, the viewmodel doesn't appear when I go first person or third person.

    • @DevKing_Phizo
      @DevKing_Phizo 8 місяців тому

      @@GGEZLLL hmm try and improvise idk it should have worked is the player local player?

    • @GGEZLLL
      @GGEZLLL 8 місяців тому

      @@DevKing_Phizo Oh now it worked ty!!!!!!!!!

    • @DevKing_Phizo
      @DevKing_Phizo 8 місяців тому

      @@GGEZLLL np!

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

    the viewmodel is invisible for somereason

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

    Is There Any Possible Way To Make It So That The Parts Are The Hands Of The Player?

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

      i think its just place parts and name them left arm and right arm and position them

  • @ObliviousNoob1
    @ObliviousNoob1 4 місяці тому

    hi does anybody know how I could animate it?

  • @Aika33700
    @Aika33700 7 місяців тому +11

    local tool = script.Parent
    local player = game.Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local Camera = workspace.Camera
    local RunService = game:GetService("RunService")
    local ViewModel
    local equipped = false
    tool.Equipped:Connect(function()
    equipped = true
    game.ReplicatedStorage.ViewModel:Clone().Parent = Camera
    end)
    tool.Unequipped:Connect(function()
    equipped = false
    ViewModel = Camera.Viewmodel
    ViewModel:Destroy()
    end)
    RunService.RenderStepped:Connect(function()
    if player.Character.Humanoid.Health

    • @FantasminElOriginal
      @FantasminElOriginal 7 місяців тому

      Bro, is that script yours or is it one from the video?

    • @Aika33700
      @Aika33700 7 місяців тому

      @@FantasminElOriginal i know that you are searching a script and yes is it one from the video

    • @FantasminElOriginal
      @FantasminElOriginal 7 місяців тому

      @@Aika33700 good

    • @Aika33700
      @Aika33700 7 місяців тому

      @@FantasminElOriginal ok.

    • @totlar
      @totlar 7 місяців тому +1

      bro thanks, you saved my life!

  • @goofysongs1722
    @goofysongs1722 8 місяців тому

    i need help i cant see my view model gun

    • @SmileyMenFR
      @SmileyMenFR 7 місяців тому

      same..

    • @oliik_icy
      @oliik_icy 5 місяців тому

      did you add handle to your tool?

    • @SmileyMenFR
      @SmileyMenFR 5 місяців тому

      @@oliik_icy uh i guess?

  • @Half-Life2Fan
    @Half-Life2Fan 4 місяці тому

    can you leave Link for The Script to copy

  • @FLAIR114
    @FLAIR114 9 місяців тому

    can you write the code in the comments bc I messed it up

  • @mrnobody_yt9449
    @mrnobody_yt9449 5 місяців тому

    Hey. I coded my viewmodel and all. It didnt work, i then used your model and still didnt work. Do you know what went wrong on my code?

    • @symonnet5990
      @symonnet5990 4 місяці тому

      Did you typo the ViewModel name?

  • @josh04811
    @josh04811 8 місяців тому +1

    yoo does this work wit melees?

    • @StuffyDev
      @StuffyDev  8 місяців тому

      it works with anything that would be a tool in a players backpack

  • @CheezyOsky
    @CheezyOsky 6 місяців тому

    Pls, how to make it have recoil??

  • @JupiterDo0vid
    @JupiterDo0vid 8 місяців тому

    could you write the script in the comments or the description by any chance?

    • @greenqz22
      @greenqz22 8 місяців тому

      go to the new pinned comment
      put it in your game
      change the viewmodel to anything you want
      done

  • @zinkdim8940
    @zinkdim8940 8 місяців тому

    can u link the whole script plz

  • @cape2378
    @cape2378 4 місяці тому

    Awesome pawsome

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

    BRUH NOW ITS NOT WORKING BECAUSE IM SUCK AT SCRIPTS :(

  • @superduperbob
    @superduperbob 7 місяців тому

    i tried your tutorial and someone else's but it still doesnt work

    • @StuffyDev
      @StuffyDev  7 місяців тому

      use the model in the pinned comment

    • @superduperbob
      @superduperbob 7 місяців тому

      @@StuffyDev k

    • @superduperbob
      @superduperbob 7 місяців тому

      @@StuffyDev ill try later

    • @superduperbob
      @superduperbob 7 місяців тому

      @@StuffyDev i tried it and it worked idk what i was doing wrong thanks tho

  • @DiellHoxhaj
    @DiellHoxhaj 9 місяців тому

    how can I fix the bug when the ViewModel stays in one place?

    • @DiellHoxhaj
      @DiellHoxhaj 9 місяців тому

      @@StuffyDev I did but now its invisible

    • @StuffyDev
      @StuffyDev  9 місяців тому

      @@DiellHoxhaj try using this model, move everything to the correct places as stated in the folder names (make sure to ungroup the folders once moved to the right places):
      create.roblox.com/store/asset/16897515665/FPS-ViewModel-by-StuffyDev

    • @DiellHoxhaj
      @DiellHoxhaj 9 місяців тому

      @@StuffyDev it says i dont have perrmission

    • @DiellHoxhaj
      @DiellHoxhaj 9 місяців тому

      @@StuffyDev Im Sorry if im making you overwotk

    • @StuffyDev
      @StuffyDev  9 місяців тому

      @@DiellHoxhaj nah you good, idk why it doesn't give you permission to download it, lemme see how i can fix it

  • @Nyx3y
    @Nyx3y 7 місяців тому

    Can you put scrip in the comments it’s hard to read

  • @GallonOfMilk3
    @GallonOfMilk3 6 місяців тому

    Bro my model doesnt show up

    • @GDrakosha
      @GDrakosha 6 місяців тому

      Same

    • @oliik_icy
      @oliik_icy 5 місяців тому

      did you add handle to your tool?

  • @MrSixtenGaming
    @MrSixtenGaming 7 місяців тому

    didint really work for me, my gun just started to fly away XD

  • @Aqui1500
    @Aqui1500 Місяць тому +1

    Doesnt work at all for me