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

What's wrong with this?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I've been trying to fix a script for 2 hours then I thought of another one and here it is.It works, but there's a wierd glitch which I've been trying to fix for the other script too.So like it gives me the tool but takes it away right after.Even this script has that problem, tho' I don't see where's the problem.Ty.

DevilFruitID = "Doge"       
folders = game.ServerStorage:FindFirstChild(".PlayerFolders")

local tool = script.Parent

tool.Handle.Touched:connect(function(Part)
    if Part.Parent:FindFirstChild("Humanoid") ~= nil then
        local player = game.Players:GetPlayerFromCharacter(Part.Parent)
        for i,v in pairs(game.ServerStorage.Tools.DevilFruits.Zoan:GetChildren()) do
            if v:IsA("Tool") and v.Name == "Doge" then
                v:Clone().Parent = player.Backpack
            end
        end
        tool:Destroy()
    end
end)

0
Try removing the tool:Destroy() part. PowerHotmail123 90 — 8y
0
Ain't workr brokenrares 48 — 8y

Answer this question