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 7 years ago
Edited 7 years ago
01for _,Panel in pairs(UI.Menu.ItemMenu:GetChildren()) do
02    if Panel:IsA("GuiObject") then
03        UI.Menu.Buy.MouseButton1Click:connect(function()
04        if Panel.ItemSelect.Value == true and Player.StatData.Credits.Value >= TotalAmount.Value then
05            Player.StatData.Credits.Value = Player.StatData.Credits.Value - TotalAmount.Value
06            wait(0.1)
07            ReplicatedStorage.Items[Panel.ItemName.Value]:Clone().Parent = Player.Backpack
08        elseif Panel.ItemSelect.Value == true and Player.StatData.Credits.Value ~= TotalAmount.Value then
09            Denied()--Just makes a messege pop up saying you do not having nuff mooneh
10        end
11        end)
12    end
13end

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 — 7y
0
Its a Bool Value Decimaprism 65 — 7y

Answer this question