I am working on a GUI that allows a player to select a character. When a character is selected before they are spawned a value is sent to an intValue within the GUI to track which character is currently selected. How would I go about comparing that intValue to the table provided below? Since intValue changes when ever the player clicks the character as a currently selected to bring up profile information, I'm assuming it would need a .changed:Connect
local t =
{
[1] = function() return game.ReplicatedStorage.C1 end,
[2] = function() return game.ReplicatedStorage.C2 end,
[3] = function() return game.ReplicatedStorage.C3 end,
[4] = function() return game.ReplicatedStorage.C4 end
}

2 comments
Why do you need to compare it? In this case, couldn't you just write 't[intValue.Value]'?
Hmm... so I would just do something like intValue.Changed:connect... return(t[intValue.Value])?