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

Cloning bugs and Integer Values?

Asked by 6 years ago
Edited 6 years ago
for _,Panel in pairs(UI.Menu.ItemMenu:GetChildren()) do
    if Panel:IsA("GuiObject") then
        UI.Menu.Buy.MouseButton1Click:connect(function()
        if Panel.ItemSelect.Value == true and Player.StatData.Credits.Value >= TotalAmount.Value then
            Player.StatData.Credits.Value = Player.StatData.Credits.Value - TotalAmount.Value
            wait(0.1)
            ReplicatedStorage.Items[Panel.ItemName.Value]:Clone().Parent = Player.Backpack
        elseif Panel.ItemSelect.Value == true and Player.StatData.Credits.Value ~= TotalAmount.Value then
            Denied()--Just makes a messege pop up saying you do not having nuff mooneh
        end
        end)
    end
end

Hello!

I am kinda stumped but basically I can buy the items but when the total amount is equal to or exact to what the player has in their "Wallet" so to speak, it will only clone the one item instead of both, even though I have enough Credits to purchase both the items.

?

Any ideas?

0
What's ItemSelect? DevNetx 250 — 6y
0
Its a Bool Value Decimaprism 65 — 6y

Answer this question