Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a tool directly insert into a player's character?

Asked by 10 years ago

Here is my code:

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        local tool = Lighting.BasicTool:clone()
        Instance.new(tool,character)
    end)
end)

The tool's name is BasicTool. I have it in Lighting. I want it to automatically equip so I would directly put it into the player's character.

0
Okay. Put it in backpack and use the script I do. fireboltofdeath 635 — 10y

2 answers

Log in to vote
0
Answered by 10 years ago

if youre going to give it directly when they join why not just put it in the backpack

Ad
Log in to vote
0
Answered by 10 years ago

Put the tool in the backpack and use this NOTE: Put this script in the tool

game.Players.PlayerAdded:connect(function(p)
wait(5)
p.Character.Humanoid:EquipTool(p.Backpack["NameOfToolHere"])
end)
script.Parent.UnEquipped:connect(function()
p.Character.Humanoid:EquipTool(p.Backpack["NameOfToolHere"])
end)

That should work! If it doesn't give me a message.

0
I'm trying to make it so you do not see the backpack. robogbot 5 — 10y

Answer this question