I have a tool that I want the game to auto-equip when I spawn in (like in wild revolvers), but I am not sure how to do this.
If you also know how to make the tool auto-equip while the backpack is disabled that would be great too.
I have a tool that I want the game to auto-equip when I spawn in (like in wild revolvers), but I am not sure how to do this.
If you also know how to make the tool auto-equip while the backpack is disabled that would be great too.
If you make the parent of the tool the character he will equip it, what I like to do for that is the following game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local ToolClone = game.ServerStorage.Tool:Clone() ToolClone.Parent = character end) end)
so just put your tool in serverstorage and put this script in serverscriptservice
Well, it's pretty simple, to make it automatically make the person equip and use the tool you need to copy this: This only works if you have the tool in the player's backpack.
game.Players.PlayerAdded:Connect(function(plr)
local char = plr.Character
local backpack = game.Players.Backpack.Toolnamehere -- Change this to the name of the tool
backpack.Parent = char
end)
Please let me know if you have any questions or something doesn't work. Other than that, hope it works for you.
@mudathir2007 Maybe there's something wrong with the script. Is the backpack the StarterPack folder? I also tried making it a LocalScript for my StarterPlayer but it did not work.
A backpack is all local. It's stored in the Local player's thingy. The starter pack is the items that are given to everyone when they join. A backpack is an individual thing. So if you clear the starter pack, it won't clear everyone's backpacks, unless they reset.
2 months later and then I find what's wrong with my script lol :|
This discussion is preserved as it was. New answers, comments, and votes are closed.
9 comments
@tacobell158 I'm trying that but it doesn't seem to be working.
is the tool in serverstorage? and the script in serverscriptservice?
Yes, I made sure.
is it giving an error?
Not really, it just won't equip the tool.
why don't you add me to team create and I could fix it
Ok sure give me a second..
I sent you a friend request
I cant help you right now maybe in like 2 hours