Cloning bugs and Integer Values?
Asked by
7 years ago Edited 7 years ago
01 | for _,Panel in pairs (UI.Menu.ItemMenu:GetChildren()) do |
02 | if Panel:IsA( "GuiObject" ) then |
03 | UI.Menu.Buy.MouseButton 1 Click: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 |
07 | ReplicatedStorage.Items [ Panel.ItemName.Value ] :Clone().Parent = Player.Backpack |
08 | elseif Panel.ItemSelect.Value = = true and Player.StatData.Credits.Value ~ = TotalAmount.Value then |
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?