local w=game.ServerStorage.States.MapVote w.CurrentlyVoting.Changed:connect(function()local i=w.CurrentlyVoting.Value script.Parent.Image.Visible=i script.Parent.CountLabel.Visible=i script.Parent.MapName.Visible=i script.Parent.Count.Visible=i end)w.Map3.Changed:connect(function()local i=w.Map3.Value script.Parent.Image.Image=i.ImageAsset.Value script.Parent.MapName.Text=i.Name end)w.Count3.Changed:connect(function()script.Parent.Count.Text=w.Count3.Value end)


local voteStates = game.ServerStorage.States.MapVote

voteStates.CurrentlyVoting.Changed:connect(function()
	
	-- Adjust visiblity
	local newVal = voteStates.CurrentlyVoting.Value
	script.Parent.Image.Visible = newVal
	script.Parent.CountLabel.Visible = newVal
	script.Parent.MapName.Visible = newVal
	script.Parent.Count.Visible = newVal
	
end)

voteStates.Map3.Changed:connect(function()
	
	-- Update map name and image
	local newMap = voteStates.Map3.Value
	script.Parent.Image.Image = newMap.ImageAsset.Value
	script.Parent.MapName.Text = newMap.Name
	
end)

voteStates.Count3.Changed:connect(function()
	
	-- Update map count
	script.Parent.Count.Text = voteStates.Count3.Value
	
end)
