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

Hat cannot be dropped?

Asked by 10 years ago

How would i do this?

1 answer

Log in to vote
0
Answered by 10 years ago

Uh this might work but it's un-tested. In theory it should just make it use the handles inside the hat so when they press "=" it wont drop anything. Sorry ahead of time if it doesn't work.

game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(char)
        wait(.2)
        for _,v in pairs(char:GetChildren()) do
            if v.ClassName == "Hat" then
                local Handle = v:FindFirstChild("Handle")
                if Handle == nil then return end
                local copy = Handle:Clone()
                v:remove()
                copy.Parent = char
            end
        end
    end)
end)
Ad

Answer this question