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

Script won't clone a Tool into the Players Backpack?

Asked by 9 years ago

I found a part of a Script in a Part, but this Part of the Script won't work. I want to make it so I (The owner of the Group) gets a Tray when you click on the Button, but it won't work. Any suggestions?

script.Parent.ClickDetector.MouseClick:connect(function(player)
    if player:GetRankInGroup(990319) == 255 then
        if script.Parent.Parent.Mugs.M8.Transparency == 0 then
            MugsInvis()
            y = player.BackPack
            z = game.Lighting.Tray
            z:Clone().Parent = y
            player.Character.Humanoid:EquipTool(z)  
        end
    end
end)

Answer this question