Frame doesn't enable/make visible

Hello there! I want my frame to be visible when the intermission hits number 0.
Unfortunately It doesn’t work. I tried to add an intValue and to change the value to the intermission’s number, neither if I change the main script to localscript or normal script don’t work, tried to look into DevForum for solutions, but no luck.

Script:

local text = script.Parent
local VMF = game.StarterGui.VoteMap.Frame
local IMT = script.IntermissionTime
local IMTV = IMT.Value


for i = 15,0,-1 do	
	IMT.Value = i
	text.Text = "Intermission: "..i
	print(i)
	wait(1)
	if i == 0 then
		text.Text = "Voting map"
	end
end

Local Script:

local Intermission = game.StarterGui.IntermissionScreenGui.TextLabel.Script.IntermissionTime
local plr = game.Players.LocalPlayer
local plrGui = plr.PlayerGui.VoteMap
local plrFrame = plrGui.VoteMapFrame

if Intermission.Value == 0 then
	plrFrame.Visible = true
end

You are only making the check once at the start of the local script I would recommend to continue checking or hook up a function:

continue checking option:

repeat wait() until Intermission.Value == 0
plrFrame.Visible = true

or function option:

Intermission:GetPropertyChangedSignal("Value"):Connect(function()
    if Intermission.Value == 0 then
        plrFrame.Visible = true
    end
end)

You can then disconnect the function if you want after Intermission reaches 0.

1 Like