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

How do you make a script that gives a tool?

Asked by 8 years ago

How do you make a script that gives a tool when they say the Word like F3x

0
Well, is an item giving the tool? Laserpenguin12 85 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

Although This is not a request site, here is the base of what you would need(this code will check for the chat said)

commands = {
    "Word" 
}


game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(msg)
        for i=1, #commands do
            if msg == string.lower(string.sub(commands[i], 1, string.len(commands[i]))) then
                if game.Players:findFirstChild(string.gsub(msg, commands[i], "")) then
                    --CODE
                end
            end
        end
    end)
end)

Hope this helped

Ad
Log in to vote
0
Answered by 8 years ago

It'd have to put the tool in your backpack. Something like this:

script.Parent = game.Players.LocalPlayer.BackPack

If you put that into the tool, It'd go into your backpack. Hope this helps!

Answer this question