#image not getting set

1 messages · Page 1 of 1 (latest)

paper raven
#
repeat task.wait() until game.Players.LocalPlayer:FindFirstChild("_loadeddata")

local Player = game.Players.LocalPlayer
local f = script.Parent.Frame
local bm = f.BoosterMain
local plrBoosters = Player:WaitForChild("Boosters")
for i, v in pairs(game.Lighting.Boosters:GetChildren()) do
    local module
    if v:IsA("ModuleScript") then
        module = require(v)
    end

    local imgButton = script.b:Clone()
    imgButton.Parent = bm
    imgButton.Name = v.Name
    local booster = plrBoosters:FindFirstChild(v.Name)
    if booster and booster.Value == true then
        imgButton.Image = module.Icon
    elseif booster and booster.Value == false then
        imgButton.Image = module.LockIcon
    end
    imgButton.MouseButton1Click:Connect(function()
        local booster = plrBoosters:FindFirstChild(v.Name)

        if booster and booster.Value == false then
            f.Info.Visible = true
            f.Info.BoosterIcon.Image = module.LockIcon
            f.Info.BoosterName.Text = "???"
            f.Info.BoosterDesc.Text = "You haven't unlocked this booster yet."
        elseif booster and booster.Value == true then
            local status = game.Lighting.EquipBooster:InvokeServer(v.Name)
            print(status)
            f.Info.Visible = true
            f.Info.BoosterIcon.Image = module.Icon
            f.Info.BoosterName.Text = v.Name
            f.Info.BoosterDesc.Text = module.Desc
        end
    end)
end

the module is a script and the code of it is

return {
    Desc = "Double your jumps with this Booster!",
    Action = "Double Jump",
    Reward = "Double Jump",
    Goal = game.Lighting.Bosses.UndertaleAU.Flowey,
    GoalDef = "onBeaten",
    LockIcon = "rbxassetid://xxx",
    Icon = "rbxassetid://xxx",
}

image 1 shows that no image is being showen
image 2 shows that the image loads fine on the lower part if you click on the unknown image

#

game.Lighting.Boosters

#

plr.Boosters

eager sparrow
#

i understand your issue

eager sparrow
paper raven
glossy sapphire
paper raven
#

Cuz it cool!!

glossy sapphire
#

Lightning isnt for storage lil bro

paper raven
#

but will you help vro 😭

glossy sapphire
#

Dude just cause it works doesnt mean its supposed to be like this

#

Jus tlike if a circle fits throight he squate hole

glossy sapphire
#

Like not visible

paper raven
#

the buttons are visible

glossy sapphire
#

the problem is te buttons are there and interactable but not visible yeah

#

?

paper raven
#

also

#

it only breaks in a if statement

glossy sapphire
#

perhaps just check if it isnt nil?

paper raven
glossy sapphire
#

checks if booster isnt nil and if its false

paper raven
#

yes

glossy sapphire
#

oh wait no shit

#

mb

#

wtv

glossy sapphire
paper raven
paper raven
glossy sapphire
#

try making the zindex highier

paper raven
#

it works fine without that..

glossy sapphire
#

wdym

paper raven
#

btw

#

if i use no if statements

#

and set it raw

#

it works fine

paper raven
paper raven
glossy sapphire
#

try deleting this line

#

and reactivating if

#

statements

paper raven
glossy sapphire
glossy sapphire
paper raven