ive been making a card game and the buttons dont want to show up they stay invisible and its printing the card art with the id but nothing shows up in the id property?? here is my code: theres other scripts as well which might be interfering:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CardArtDB = require(ReplicatedStorage:WaitForChild("CardArtDB"))
local player = game.Players.LocalPlayer
local gui = player:WaitForChild("PlayerGui"):WaitForChild("DecklockUI")
local cardFrames = {
gui:WaitForChild("Card1"),
gui:WaitForChild("Card2"),
gui:WaitForChild("Card3")
}
local function updateHand()
local hand = player:WaitForChild("Hand")
local cards = {}
for _, card in ipairs(hand:GetChildren()) do
table.insert(cards, card)
end
table.sort(cards, function(a, b)
return a.Name < b.Name
end)
for i = 1, 3 do
local frame = cardFrames[i]
local card = cards[i]
if card then
local art = CardArtDB[card.Value]
print("Art for card:", art)
if art then
frame.Image = art
frame.Visible = true
frame.ImageTransparency = 0
else
frame.Visible = false
end
else
frame.Visible = false
end
end
end
player:WaitForChild("Hand").ChildAdded:Connect(updateHand)
player:WaitForChild("Hand").ChildRemoved:Connect(updateHand)
wait(1)
updateHand()
