of     1   

KamilSVK
#36484842Thursday, November 04, 2010 2:40 PM GMT

1. model = script.Parent.Parent backup = model:clone() enabled = true function regenerate() local user = game.Players:GetPlayerFromCharacter(hit.Parent) local stats = user:findFirstChild("leaderstats") local cash = stats:findFirstChild("Gold") if stats ~= nil then if cash.Value > (199) then cash.Value = cash.Value - 200 model = backup:clone() model.Parent = game.Workspace model:makeJoints() script.Disabled = true script.Parent.BrickColor = BrickColor.new(26)wait(5) script.Parent.BrickColor = BrickColor.new(104) script.Disabled = false end end end function onHit(hit) if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then regenerate() end end script.Parent.Touched:connect(onHit) Script woking! I added lines local stats = user:findFirstChild("leaderstats") local cash = stats:findFirstChild("Gold") if stats ~= nil then if cash.Value > (199) then cash.Value = cash.Value - 200 And script dont work... Leader stats have "Gold" and problem is 99% in regen script ///////////////////////////////////////////////////////////////////////////// 2. Upgradecost = 100 local debounce = false function getPlayer(humanoid) local players = game.Players:children() for i = 1, #players do if players[i].Character.Humanoid == humanoid then return players[i] end end return nil end function onTouch(part) local human = part.Parent:findFirstChild("Humanoid") if (human ~= nil) and debounce == false then debounce = true local player = getPlayer(human) if (player == nil) then return end local stats = user:findFirstChild("leaderstats") if stats ~= nil then local cash = stats:findFirstChild("Gold") if cash.Value > (Upgradecost-1) then cash.Value = cash.Value - Upgradecost script.Parent:clone().Parent = player.Backpack wait(2) debounce = false end end end end script.Parent.Parent.Touched:connect(onTouch) Same as 1. Upgradecost = 100 local stats = user:findFirstChild("leaderstats") if stats ~= nil then local cash = stats:findFirstChild("Gold") if cash.Value > (Upgradecost-1) then cash.Value = cash.Value - Upgradecost Dont work...
WK100
#36484855Thursday, November 04, 2010 2:42 PM GMT

KamilSVK
#36484884Thursday, November 04, 2010 2:44 PM GMT

HINT 1. Script woking! I added lines local stats = user:findFirstChild("leaderstats") local cash = stats:findFirstChild("Gold") if stats ~= nil then if cash.Value > (199) then cash.Value = cash.Value - 200 And script dont work... Leader stats have "Gold" and problem is 99% in regen script /////////////////////////////////////////////////////////////////////////// HINT 2. Same as 1. Upgradecost = 100 local stats = user:findFirstChild("leaderstats") if stats ~= nil then local cash = stats:findFirstChild("Gold") if cash.Value > (Upgradecost-1) then cash.Value = cash.Value - Upgradecost
WK100
#36484927Thursday, November 04, 2010 2:48 PM GMT

Output? We need more info!
KamilSVK
#36485026Thursday, November 04, 2010 2:54 PM GMT

1. script in regen brick,when i step on it it dont do anything and dont take Gold 2. script in weapon giver,dont do anything and dont take Gold 1. and 2. woked but when i added some lines in dont work som bug is somewhere in these lines
WK100
#36485379Thursday, November 04, 2010 3:15 PM GMT

I asked for output >.<
KamilSVK
#36485537Thursday, November 04, 2010 3:27 PM GMT

sorry my englis is not best and i dont know what it is ...

    of     1