Это видео недоступно.
Сожалеем об этом.

Roblox Scripting Tutorial: How to Check a Players Backpack for a Tool

Поделиться
HTML-код
  • Опубликовано: 16 авг 2024
  • I hope you learned a thing or two about scripting. If you want to learn more about scripting on Roblox, take a look at some of my other videos. Thanks for watching!
    Script: pastebin.com/r...
    Roblox Model Containing Everything Shown in Video: www.roblox.com...
    Join the RoScripter Group: www.roblox.com...
    Join My Discord Server: / discord

Комментарии • 103

  • @shinobii5286
    @shinobii5286 4 года назад +11

    You should make a video on how to make custom weapons with custom reloading animations and stuff.

  • @velsetheverlormember
    @velsetheverlormember 2 года назад

    here's the copy and paste:
    local ToolName = "your tool name"
    game.Players.PlayerAdded:Connect(function)(Player)
    Player.CharacterAdded:Connect(function)(Character)
    if Player.Backpack:FindFirstChild(ToolName) then
    --Do whatever we want to do if the player has the tool
    print("Player has tool")
    else
    --Do whatever we want to do if the player does not have the tool
    print("Player does not have tool")
    end
    end)
    end)

  • @srhotty
    @srhotty 3 года назад +1

    Thanks dude. Subbed
    Idea: Full blown inventory guide, or a advanced game scripting series? [basically we use what we learn in the normal series and combine them and use more tricky stuff]
    more ideas = read more
    1. Tool guide:
    How to make a tool
    How to script the tool
    How to make configuration
    How to give the tool to only 1 player
    Conclusion
    2. How to give a item to only one person when they join:
    3. How to make advanced tools
    How to animate [i don't expect this one to be posted]
    How to make a script run when someone clicks on another player
    How to check what they hit
    How to optimize it
    How to add effects
    4 .How to make a nostalgic type game [maybe use sfoth as the map?]
    How to import the old animations
    How to add the old cursor
    How to build a old nostalgic map
    How to make the old leaderboard
    Tool spawning
    Randomizing time
    Conclusion
    Rating
    That's all i have.
    Thanks again for the script.

  • @rishabhdagli5923
    @rishabhdagli5923 4 года назад

    + i think its great how your helping people by making vids. were all making roblox better together

    • @RoScripter
      @RoScripter  4 года назад

      Thanks haha. I'm always thrilled to better the community. Thanks for watching!

  • @Ze3e3e
    @Ze3e3e 2 года назад

    my guy started from 10 subs all the way to 29k subs. holy

  • @XtraContent
    @XtraContent 2 года назад +2

    Thanks for this awesome tutorial it really helped!

    • @RoScripter
      @RoScripter  2 года назад

      Of course! I’m so happy I was able to help. Thanks for watching!

  • @proadam1177
    @proadam1177 Год назад

    bro this helped me so much I will finally be able to finish my game :)))

  • @ryk_cbaool
    @ryk_cbaool Год назад +1

    you are the best

  • @startrilogy
    @startrilogy 2 года назад +1

    Hey dude ! Could you make a tutorial to check if a player have a tool in her hand like a classic sword ? Thank you

  • @end_q3934
    @end_q3934 4 года назад +1

    Thank you earned a sub and a like.

  • @Aizden.shindo
    @Aizden.shindo 8 месяцев назад

    Could u make one wear it checks if they have it equipped

  • @glossyrobloxyt4461
    @glossyrobloxyt4461 4 года назад +2

    I'm Trying To Make it so When A Player Clicks Something With The Tool a property will change to that thing like a click detector can you give me a hand? Thx for the Tutorial still.

    • @RoScripter
      @RoScripter  4 года назад

      Hey! I think this will help with what you're looking to accomplish ruclips.net/video/jlSsoXxPPIo/видео.html. Thanks for watching!

    • @glossyrobloxyt4461
      @glossyrobloxyt4461 4 года назад

      @@RoScripter Thank You So Much

  • @gdgust2547
    @gdgust2547 2 года назад

    how to make it so when the tool is in ur backpack for it not to work and when he is HOLDING it make it work

  • @jettus9001
    @jettus9001 3 года назад

    Thanks! This really helped me!

    • @RoScripter
      @RoScripter  3 года назад +1

      Of course. Thanks for watching!

  • @frostberry
    @frostberry 4 года назад +1

    Can you do what you did in this video but when you click something. Like if you have a key and you can have it in your backpack but you can still unlock the door? Would be really useful.

    • @RoScripter
      @RoScripter  4 года назад

      Great suggestion! I probably won’t make a video on that because it is very similar to this, but if you continue to follow my beginner scripting series you may find guidance there on how to do something like this. Thanks for watching!

    • @castipro
      @castipro Год назад

      Well probably, make a script in the door that checks if it touched a item/model named "Key" or whatever's your model's name and then put in the script, after that
      script.Parent:Destroy()
      --Assuming that your script is in the door

  • @z_8711
    @z_8711 2 года назад

    It's not printing anything, the tool's name is TestTool. Nothing works?

  • @ultimate_npc
    @ultimate_npc Год назад

    How to check if a player is Holding an Item?

  • @epicdhplayr
    @epicdhplayr Год назад

    it broke my very complicated script and it doesnt give me an error

  • @theglownt
    @theglownt 2 года назад

    Thank you very much!

  • @rishabhdagli5923
    @rishabhdagli5923 4 года назад

    Um you said to give questions, mid making a vid on game passes if u have not, I subed

    • @RoScripter
      @RoScripter  4 года назад

      Great idea! I'll do that sometime soon in my beginner scripting series. Thanks for watching!

  • @kristaregan2095
    @kristaregan2095 3 года назад

    Suggestion: (I really need this lol)
    How do I put an item and make it able to pick up and then whenever it gets taken out of the backpack or they players left it goes back to that spot?

  • @trunker08
    @trunker08 2 года назад

    How would I keep checking the player's inventory? I have a script that when a button is clicked it will give the tool, however this won't work because this script checks for the tool the moment the player joins in.

  • @sil8nt653
    @sil8nt653 2 года назад

    if you have the item equipped it doesn't count as being in the backpack how do I fix this?

  • @mr.pancakeswaffles9773
    @mr.pancakeswaffles9773 Год назад

    how could we make it so a script does something if the player does not have anything in their inventory, say when you click a proximity prompt and you do not have anything in ur inventory it says a message?

  • @EndeXlol
    @EndeXlol 2 года назад

    It doesn't work if I will add the tool to the player later. Is here any way to fix it

  • @marcboss
    @marcboss 2 года назад

    Thank you so much!

  • @shitcurity
    @shitcurity 3 года назад

    how to make gui button which work only if player have tool in backpack

  • @tymint3882
    @tymint3882 4 года назад

    Maybe a video on how to make an object that when you click it would create a new part where the cursor is?

    • @RoScripter
      @RoScripter  4 года назад +1

      Great idea! I'll be doing beginner video's on instance.new and the mouse very soon. Thanks for watching!

  • @viarayordanova4056
    @viarayordanova4056 3 года назад

    hii can you make video:how to make game1 teleport to game2

  • @HiddenTheAnimator
    @HiddenTheAnimator 4 года назад

    Hi I need to know how the tool can be deleted like a rebirth system I have everything else for the system working but I don't know how the take away the tools

  • @bloxyscraps4787
    @bloxyscraps4787 4 года назад

    How'd I count the number of tools and If the player has a certain amount it would print something

  • @Ra_ks
    @Ra_ks 3 года назад

    Hello sir! I really need one scripting from u! Like: If player have that tool inside them backpack, then one gui got visible and it called sell, and if the player click on the ui it sell them tool and earn money! (Really thanks if u understand and you make it! I have bad english but i try.) [I Sub and liked]

  • @olivergamer2347
    @olivergamer2347 4 года назад

    How do you make something like this but its scanner you walk through so i can make a border game.

  • @mees5419
    @mees5419 4 года назад

    FINALLY A GOOD VIDEO

  • @mahaalakshmiprasad3340
    @mahaalakshmiprasad3340 3 года назад

    Thx a lot man

  • @KccowboyandBenji
    @KccowboyandBenji 2 года назад

    my output says Backpack isnt a valid member of all the body parts? can you help me.

  • @missjude01
    @missjude01 Год назад

    is there any way of turning the music off ?

  • @ugly.jumper
    @ugly.jumper 2 года назад

    thanks a lot this helps with the problem I have... "+1 sub" but if I may ask how do i stop a player if having the same tool appear twice in their backpack??

    • @memenadekhanh3992
      @memenadekhanh3992 2 года назад

      write a script that check if player have the tool of the same name and delete the other tool.

  • @TheNotKnown0ne
    @TheNotKnown0ne Год назад

    how to see if a tool is equipped?

  • @blutoh4181
    @blutoh4181 2 года назад

    how can i check if the tool is equipped?

  • @ROLLINGRAGETVs
    @ROLLINGRAGETVs Год назад

    can u do a anti lag gui that destroys shadow and objects in the game

  • @gamyefire
    @gamyefire 4 года назад

    how do you make it so player cant pick up an item if he has an item named something
    example: player cant pickup sword if he has an item named bomb in his inventory

    • @RoScripter
      @RoScripter  4 года назад

      Hey! Thanks for reaching out. Please join my Discord server (linked in the description) and post your question under scripting-support as I can better help you there. Thanks for watching!

  • @cathymeehan7691
    @cathymeehan7691 4 года назад

    i have a good video idea: How to script a moving block
    Thanks for the heart! :D

    • @RoScripter
      @RoScripter  4 года назад

      Great idea! I actually already made a video about tweening parts, but haven't uploaded it yet because I need to make videos on some other basic things first. Thanks for the suggestion!

    • @cathymeehan7691
      @cathymeehan7691 4 года назад

      Thanks! anything to help! im making a game that doesnt require scripting, but its way more fun to do the extra work and make it look all cool! Ill wait for the vid! I'm actually getting better at scripting because of you, your a life saver! :D

    • @RoScripter
      @RoScripter  4 года назад

      Cathy Meehan Thanks so much! I’m glad I was able to help!

    • @cathymeehan7691
      @cathymeehan7691 4 года назад

      Your always a help :)

  • @thatonelem
    @thatonelem 3 года назад +1

    How do you make it so it gives the player the tool?

    • @mistyoverheaven
      @mistyoverheaven 2 года назад

      You probably don't need this anymore but...
      print("Player does not have the tool.")
      wait(5)
      local Tool = game.ServerStorage["TOOLNAMEHERE"]:Clone()
      Tool.Parent = Player.Backpack
      print("Gave Player the tool.")
      What this does is prints that the Player does not have the tool then waits 5 seconds to give the Player the tool then prints that the Player was given the tool.

    • @thatonelem
      @thatonelem 2 года назад

      @@mistyoverheaven Yeah, I figured it out.

  • @nebulalition7248
    @nebulalition7248 4 года назад

    This this work when your playing the game not in RobloxStudio?

  • @truestbluu
    @truestbluu 4 года назад +2

    can you make a tutorial where it shows the tool name when you equip it

  • @mahaalakshmiprasad3340
    @mahaalakshmiprasad3340 3 года назад

    How to check if tool is equipped or not?

  • @Agentgilspy
    @Agentgilspy 4 года назад

    can u make a video if u can
    in which you can come to know if a room is being claimed by a player?

    • @RoScripter
      @RoScripter  4 года назад

      Great idea! I'll consider making a video on that. Thanks for the suggestion!

  • @Just_Ligij
    @Just_Ligij 4 года назад

    Thanks for the tutorial. Can you help me? How to make that script in infinite loop to keep updating that script?

    • @Tung-lu5fj
      @Tung-lu5fj 4 года назад

      I need it for my hotel check in system also. I just tried to make it if player have the tool then it will turn red, if none then green. But it is just only detecting the tool when player just joined. So if people checked in then it will not change.

    • @Just_Ligij
      @Just_Ligij 4 года назад

      @@Tung-lu5fj i dont need that system anymore i bought check me in for 4000 robux

  • @h_pe
    @h_pe 2 года назад

    how do i make this repeat?

  • @404nf_
    @404nf_ 3 года назад

    Where's the red button? Oh, its grey.

  • @Sir_Pixelated
    @Sir_Pixelated 3 года назад

    I cannot see what it says

  • @brutal5906
    @brutal5906 3 года назад

    how i can detect 2 specific tools?

  • @jozhieproductions
    @jozhieproductions 3 года назад

    Hey! I am super lost and am in need of a huge amount of help. I am making a roblox place where you have to find 8 little action figures hidden in the map. What I want to do is make it so that when you find one, you click it and it gets puts into your backpack as a tool, and if you already have it, a message pops up for a few seconds saying "You already found this one!". I also made a screen gui that shows you how many you've found (Like a checklist, when you find one a check mark image label appears). However, I cant make it work properly and I have no idea why. I am relatively new to Roblox Studio so I need a lot of help, but there is nothing on the internet I can find to help. I know this is kinda complicated but Im completely stuck and was wondering if you'd be able to help me? (If it makes it any easier, I could upload a video of what Im trying to do and what I need help with and then link it to you)

    • @HiHi-ek1dd
      @HiHi-ek1dd 3 года назад

      Good luck! I don't know how to do it sorry but good luck

    • @jozhieproductions
      @jozhieproductions 3 года назад

      @@HiHi-ek1dd all good, I managed to figure it all out 🧐

    • @HiHi-ek1dd
      @HiHi-ek1dd 3 года назад

      @@jozhieproductions That's great!

  • @LumynSK
    @LumynSK 4 года назад

    I'm trying to make it detect multiples tools with different names, can u help me?

    • @lavrivus
      @lavrivus 3 года назад +1

      The same, did u find an answer? I tried GetChildren() but it doesnt work

  • @thebluemasteryt3473
    @thebluemasteryt3473 Год назад

    How do I check if the player is holding it?

    • @crypto1upteam750
      @crypto1upteam750 Год назад

      yeah same problem lol i needed this for holding a tool. if you find the answer please let me know

    • @thebluemasteryt3473
      @thebluemasteryt3473 Год назад

      @@crypto1upteam750 So I got the awnser, since i am I small dev I found a way

    • @IamThe1Cookie
      @IamThe1Cookie Год назад

      ​@@crypto1upteam750 Ik it has been over 8 months, but do you still need help?

  • @whackos1082
    @whackos1082 4 года назад

    how to do this but when you touch a block

    • @RoScripter
      @RoScripter  4 года назад

      Hi! Thanks for watching the video. I suggest taking a look at this page, as it explains how to handle when a part is touched. You would use the sample code it gives you and then put the script from this video inside of it. developer.roblox.com/en-us/api-reference/event/BasePart/Touched. I hope I was able to help!

  • @dexiiiii1
    @dexiiiii1 4 года назад

    So they drop it

  • @bruh-xr4xi
    @bruh-xr4xi 3 года назад

    tysm

  • @townhouse09
    @townhouse09 3 года назад

    He sounds a little less enthusiastic in this video

  • @dexiiiii1
    @dexiiiii1 4 года назад

    How to do if they drop it

    • @RoScripter
      @RoScripter  4 года назад +1

      If they drop it, you would have to some how keep track of the players backpack items. Thanks for watching!

    • @dexiiiii1
      @dexiiiii1 4 года назад

      RoScripter ooo can u make tutorial on it pls

    • @dexiiiii1
      @dexiiiii1 4 года назад

      RoScripter nobody has made a tutorial yet on this

    • @RoScripter
      @RoScripter  4 года назад

      @@dexiiiii1 Possibly. Thanks for suggesting!

    • @dexiiiii1
      @dexiiiii1 4 года назад

      RoScripter yay

  • @gaddourjmal7394
    @gaddourjmal7394 3 года назад