of     1   

powerfultyphlosion
#156788549Thursday, February 26, 2015 3:57 PM GMT

UPMouse.MouseButton1Click:connect(buy(1,1,1,2)) --That's apparently an error
[rfa#hidefromsearch]
#156788575Thursday, February 26, 2015 3:58 PM GMT

[rfa#hidefromsearch]
powerfultyphlosion
#156788652Thursday, February 26, 2015 4:00 PM GMT

07:56:01.805 - Script 'Players.Player1.PlayerGui.Design.Frame.Frame2.UpgradeScript', Line 124 07:56:01.805 - Stack End 07:56:19.979 - attempt to call a nil value
powerfultyphlosion
#156788912Thursday, February 26, 2015 4:06 PM GMT

This is the actual function --- function buy (thing,price,upgrade,type)--real function --VARS if thing == 1 then thing = UPMouse --upgrade1 --elseif true then --upgrade2 end --- if price == 1 then upgrade = UPMouse.Price.Value--upgrade1 end --- if upgrade == 1 then upgrade = UPMouse.Upgrade.Value--upgrade1 end ----------------------------------- local number = value.Value - price local color = thing.TextColor3 if number < 0 then -- if not enough money thing.TextColor3 = Color3.new(255,0,0) thing.Text = "Not enough money" for i=1,10 do thing.Visible = false wait(.01) UPMouse.Visible = true wait(.01) end thing.TextColor3 = color thing.Text = thing.Name.." $"..tostring(thing.Price.Value) elseif number >= 0 then --if enoughmoney then value.Value = value.Value - price--Upgrade as needed if type == 1 then CPS.Value = CPS.Value + upgrade elseif type == 2 then ClickIncrease.Value = ClickIncrease.Value + upgrade end --Change values thing.Price.Value = thing.Price.Value + UPMouse.Price.Value/2 thing.Upgrade.Value = thing.Upgrade.Value thing.Text = thing.Name.." $"..tostring(thing.Price.Value)--good end end

    of     1