Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
PPJASK 19
3 years ago

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

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

0
with loop PPJASK 19 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

Use:

game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = true
Ad
Log in to vote
0
Answered by 3 years ago

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)

Answer this question