Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make if image (ImageLabel) = rbx.... then StarterGui.ScreenGui.Frame.Visible = true ?

How to make if image (ImageLabel) = rbx.... then StarterGui.ScreenGui.Frame.Visible = true ?

How to make this -? thank u and best regards -PPJASK

1 comment

0

with loop

2 answers

Use:

game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = true

Simple:

local ImageLabel = script.Parent
local InstanceFra = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame
local RunService = game:GetService("RunService")

local AssetID = "123" -- make this your image label assetID

local function CheckImage()
      if ImageLabel.Image == ("rbxassetid://" .. AssetID) then
         return true
      else
         return false
      end
end

local function RunServiceFunction()
       if CheckImage() == true then  -- if the Image is your assetID ( returned true ) frame is visible.
         InstanceFra.Visible = true
       else
         return
      end
end
   
RunService.RenderStepped:Connect(RunServiceFunction)

This discussion is preserved as it was. New answers, comments, and votes are closed.