Im trying to have a specific frame pop up if the player has said badge. I get no errors and the Value i have created in the player works. But when i try to use the value in my module script it doesnt work. It shows true in the player like it should. I just cant get it to work for the visibility of the frame.
Module Script -
local Players = game:GetService("Players")
local player = Players:GetChildren()
local TowerShop = {
["Bronze Robloxian"] = {
["Name"] = "Bronze Robloxian",
["ImageAsset"] = "rbxassetid://" ,
["Price"] = 1 ,
["Description"] = "blank",
["Event"] = player.Even
}
}
function where i check for the event so it should make the frame visible -
function updateItems()
points.Text = "Points : " .. playerData.Points
limit.Text = #playerData.SelectedTowers .. "/4"
for i, tower in pairs(towers) do
local oldButton = gui.Frame.Center1.List:FindFirstChild(tower.Name)
if oldButton then
oldButton:Destroy()
end
local newButton = itemsFrame:Clone()
newButton.Name = tower.Name
newButton.TowerName.Text = tower.Name
newButton.Price.Text = tower.Price .. " Points"
newButton.Image.Image = tower.ImageAsset
newButton.Desc.Text = tower.Description
newButton.Visible = tower.Event
newButton.LayoutOrder = tower.Price
newButton.Parent = gui.Frame.Center1.List
local status = getItemStatus(tower.Name)
if status == "For Sale" then
newButton.Status.Text = "PURCHASE"
elseif status == "Equipped" then
newButton.Status.Text = "EQUIPPED"
newButton.Price.Visible = false
else
newButton.Status.Text = "EQUIP"
newButton.Price.Visible = false
end
newButton.Status.Activated:Connect(function()
interactItem(tower.Name)
end)
end
end
Ive moved things around and got it where theres no errors so im afraid to move anything else and completely butcher it lol