#Dropper Invisible

1 messages · Page 1 of 1 (latest)

finite forum
#

Hey im trying a simple tycoon as first game and i have the probleme that my Dropper should be invisible till you press the first Button but its visible all time. i think my script cant find the dropper Folder in the path but im not sure. maybe someone can help me.

my sript an path:

  • Workspace
    • Camera
    • Terrain
    • Tycoons
      • Tycoon
        • Audio
        • Buttons
          • ColorizerButton
          • DropperButton
            • Object

            • Price

            • Button
        • DropperParts
        • MainItems
        • PurchasedItems
          • Colorizer
          • Materializer
          • Dropper
            • Build
            • DropperScript
            • Spawner
        • Scripts
          • Core
        • Values
          • DropColorValue
          • MaterialValue

          • MoneyValue

          • OwnerValue

          • TycoonColor
    • SpawnLocation
    • Rig
    • Baseplate
    • Players
if buttons then
    for i, v in pairs(buttons:GetChildren()) do
        spawn(function()
            if v:FindFirstChild("Button") then

                local newObject = purchasedItems:FindFirstChild(v.Object.Value)
                if newObject ~= nil then
                    objects[newObject.Name] = newObject:Clone()
                    newObject:Destroy()
                else
                    v:Destroy()
                end

                if v:FindFirstChild("Dependency") then
                    v.Button.Transparency = 1
                    v.Button.CanCollide = false
                    v.Button.BillboardGui.Enabled = false
                    coroutine.resume(coroutine.create(function()
                        if purchasedItems:WaitForChild(v.Dependency.Value) then
                            v.Button.Transparency = 0
                            v.Button.CanCollide = true
                            v.Button.BillboardGui.Enabled = true
                        end
                    end))
                end

                v.Button.Touched:Connect(function(hit)
                    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
                    if player then
                        if values.OwnerValue.Value == player then
                            if v.Button.CanCollide == true then
                                if player:FindFirstChild("leaderstats").Cash.Value >= v.Price.Value then
                                    player.leaderstats.Cash.Value -= v.Price.Value
                                    objects[v.Object.Value].Parent = purchasedItems
                                    v:Destroy()
                                end
                            end
                        end
                    end
                end)
            end
        end)
    end
end
naive topaz
#

v:Destroy() destroys every part in it.

finite forum
naive topaz
#

move ur dropper to a hidden storage

#

MainItems, ServerStorage, etc

#

not purchased items