|
| 24 Feb 2015 03:34 AM |
Im currently using this local script that gives the player a set of tools (weapons) when he/she pushes the GUI button. The GUI no longer shows up (Its a loadout GUI) I want the weapon to be permanent until Disconnect. Not gone on Death, Not persistent on disconnect.
This is the code:
local player = game.Players.LocalPlayer local backpack = player.Backpack
function chooseClass(class) for i, v in pairs(backpack:GetChildren()) do v:remove() end for i, v in pairs(class:GetChildren()) do if v:IsA("Tool") then v:clone().Parent = backpack elseif v:IsA("HopperBin") then v:clone().Parent = backpack end end script.Parent.Main.Visible = false end
for i, v in pairs(script.Parent.Main:GetChildren()) do v.MouseButton1Up:connect(function () chooseClass(v) end) end
What am I doing wrong? |
|
|
| Report Abuse |
|
|
GOLDC3PO
|
  |
| Joined: 31 May 2011 |
| Total Posts: 509 |
|
| |
|
| |
|
| |
|
| |
|