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

What is wrong with this-Solved-?

Asked by 8 years ago

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. -No removing tool:Destroy() won't do it- Update:I saw how it works in solo, when I pressed player model.So the tool is in my hand, it's parent is the player.When I deselect, the parent is backpack and 1 second after it dissapears

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
Remove all the scripts on the "Doge" tool and see if it still disappears. This is so we can diagnose what is actually causing the tool to disappear. XAXA 1569 — 8y
0
I lost it. brokenrares 48 — 8y
0
Nvm fixed it thank you. brokenrares 48 — 8y

Answer this question