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

Script for shop help? :|

Asked by 8 years ago

Ok, so here problem. This script for some button. And this script creating "IntValue". This "IntValue" have name with item id and a value with amount of item. Here "id"'s list: Basic Conveyor - id:1 Basic Furnace - id:2 Basic Iron Mine - id:3 Large Ore Upgrader - id:4 . This script creating "IntValue" with name like: "1" - its a id(mean Basic Conveyor), with a value like "1" - its a amount of item, into folder with items (ex: Player1's items). Here a script:

local object = game.ReplicatedStorage
local localplayer = game.Players.LocalPlayer
local folder = localplayer.Items
 script.Parent.Parent.TextButton.MouseButton1Down:connect(function()
    for i, items in pairs(object:GetChildren()) do
        local addeditem = Instance.new("IntValue")
    addeditem.Name = items[1].Value
    addeditem.Value = addeditem.Value + 1
    addeditem.parent = folder
    end
end)
0
Sooo, what's the problem? SimplyRekt 413 — 8y
0
You didn't capitalize Parent in line 9. BennyBoiOriginal 293 — 8y

Answer this question