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

hey I wanna use tools?

Asked by 3 years ago

uh how do I give players specific tools, I haven't use it in so long I completely forgot lol

1 answer

Log in to vote
0
Answered by
yx10055 57
3 years ago
-- Put your tool in some place like ReplicatedFirst or ReplicatedStorage or ServerStorage.
-- In this case I used ServerStorage.
local Sword = game:GetService("ServerStorage").ClassicSword -- Replace this with the path of your tool

function GiveToolToPlayer(tool, player)
    local Tool = tool:Clone()
    Tool.Parent = player:WaitForChild("Backpack")
end

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:connect(function(character)
        wait(10)
        GiveToolToPlayer(Sword, player)
    end)
end)

The script above gives a tool to a player 10 seconds after their character loads.

Ad

Answer this question