Это видео недоступно.
Сожалеем об этом.
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
You should make a video on how to make custom weapons with custom reloading animations and stuff.
Shinobii Great idea! I’ll do some combat videos soon. Thanks for watching!
When :(
@RoScripter
@@robloxrandomcreations1687 lol
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)
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.
+ i think its great how your helping people by making vids. were all making roblox better together
Thanks haha. I'm always thrilled to better the community. Thanks for watching!
my guy started from 10 subs all the way to 29k subs. holy
Thanks for this awesome tutorial it really helped!
Of course! I’m so happy I was able to help. Thanks for watching!
bro this helped me so much I will finally be able to finish my game :)))
you are the best
Hey dude ! Could you make a tutorial to check if a player have a tool in her hand like a classic sword ? Thank you
Thank you earned a sub and a like.
Thanks so much!
Could u make one wear it checks if they have it equipped
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.
Hey! I think this will help with what you're looking to accomplish ruclips.net/video/jlSsoXxPPIo/видео.html. Thanks for watching!
@@RoScripter Thank You So Much
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
Thanks! This really helped me!
Of course. Thanks for watching!
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.
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!
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
It's not printing anything, the tool's name is TestTool. Nothing works?
How to check if a player is Holding an Item?
it broke my very complicated script and it doesnt give me an error
Thank you very much!
Um you said to give questions, mid making a vid on game passes if u have not, I subed
Great idea! I'll do that sometime soon in my beginner scripting series. Thanks for watching!
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?
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.
if you have the item equipped it doesn't count as being in the backpack how do I fix this?
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?
It doesn't work if I will add the tool to the player later. Is here any way to fix it
Thank you so much!
how to make gui button which work only if player have tool in backpack
Maybe a video on how to make an object that when you click it would create a new part where the cursor is?
Great idea! I'll be doing beginner video's on instance.new and the mouse very soon. Thanks for watching!
hii can you make video:how to make game1 teleport to game2
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
How'd I count the number of tools and If the player has a certain amount it would print something
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]
How do you make something like this but its scanner you walk through so i can make a border game.
FINALLY A GOOD VIDEO
Lol thanks so much!
Thx a lot man
my output says Backpack isnt a valid member of all the body parts? can you help me.
is there any way of turning the music off ?
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??
write a script that check if player have the tool of the same name and delete the other tool.
how to see if a tool is equipped?
how can i check if the tool is equipped?
can u do a anti lag gui that destroys shadow and objects in the game
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
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!
i have a good video idea: How to script a moving block
Thanks for the heart! :D
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!
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
Cathy Meehan Thanks so much! I’m glad I was able to help!
Your always a help :)
How do you make it so it gives the player the tool?
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.
@@mistyoverheaven Yeah, I figured it out.
This this work when your playing the game not in RobloxStudio?
yes it does
can you make a tutorial where it shows the tool name when you equip it
this u!??!
How to check if tool is equipped or not?
can u make a video if u can
in which you can come to know if a room is being claimed by a player?
Great idea! I'll consider making a video on that. Thanks for the suggestion!
Thanks for the tutorial. Can you help me? How to make that script in infinite loop to keep updating that script?
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.
@@Tung-lu5fj i dont need that system anymore i bought check me in for 4000 robux
how do i make this repeat?
Where's the red button? Oh, its grey.
I cannot see what it says
how i can detect 2 specific tools?
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)
Good luck! I don't know how to do it sorry but good luck
@@HiHi-ek1dd all good, I managed to figure it all out 🧐
@@jozhieproductions That's great!
I'm trying to make it detect multiples tools with different names, can u help me?
The same, did u find an answer? I tried GetChildren() but it doesnt work
How do I check if the player is holding it?
yeah same problem lol i needed this for holding a tool. if you find the answer please let me know
@@crypto1upteam750 So I got the awnser, since i am I small dev I found a way
@@crypto1upteam750 Ik it has been over 8 months, but do you still need help?
how to do this but when you touch a block
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!
So they drop it
tysm
He sounds a little less enthusiastic in this video
How to do if they drop it
If they drop it, you would have to some how keep track of the players backpack items. Thanks for watching!
RoScripter ooo can u make tutorial on it pls
RoScripter nobody has made a tutorial yet on this
@@dexiiiii1 Possibly. Thanks for suggesting!
RoScripter yay