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

How do I make a script that give you a tool?

Asked by 10 years ago

I want a script for a giver that gives you a tool from game lighting.

2 answers

Log in to vote
-1
Answered by 10 years ago

-insert this Script into the block the plater has to touch to obtain the tool -make a model in lighting containing all the tools you want players to have and name it GearPack -If you ever want to change what's in it just change it from the model in lighting. -You don't need to change anything in the script. :D -DON'T FORGET MY +1 :3

local waitTime = 1
local db = true
function GetGear(hit)
    if db == true then
        db = false
        destination = game.Players:GetPlayerFromCharacter(hit.Parent)
        destination:WaitForChild("Backpack")
        for a, z in pairs(game.Lighting.GearPack:GetChildren()) do
            local Gear = tostring(z)
            local BackPackGearCopy = game.Lighting.GearPack[Gear]:Clone()
            BackPackGearCopy.Parent = destination.Backpack
            wait()
        end
        wait(waitTime)
        db = true
    else
        print("Cooling down!")
    end
end

script.Parent.Touched:connect(GetGear)
Ad
Log in to vote
0
Answered by
Tesouro 407 Moderation Voter
10 years ago

Why lighting? anyway...

newtool = tool:Clone()
newtool = game.Players.LocalPlayer.Backpack

Put in tool the location of your tool. Has to be local script.

Answer this question