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

Weapon drop in specific directory?

Asked by 4 years ago

How can I make a tool drop into game.workspace.tools instead of the workspace? Any help is appreciated, thanks!

0
Can you add more details please Nguyenlegiahung 1091 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago
local tool = --where ever the tool is located
tool.Parent = game.workspace.tools
0
Sorry but thats not what I am looking for... I need it to go into a certain directory when a player drops it. Dreadd15 4 — 4y
Ad
Log in to vote
0
Answered by
sydre 229 Moderation Voter
4 years ago
tool.Changed:Connect(function()
    local player = game.Players:GetPlayerFromCharacter(tool.Parent)
    if not player then
        tool.Parent = game.Workspace.tools
    end
end)

Should do the trick

Answer this question