How to find a player from a StringValue

How would I go about checking two StringValues and fire their client to update.
This is what I have at the moment but it doesn’t seem to be working.

local Player1 = tycoon:FindFirstChild("Player1")
local Player2 = tycoon:FindFirstChild("Player2")
if Player1.Value ~= "" then
	for i, v in pairs(game.Players:GetPlayers()) do
		if v == Player1 then
			Update:FireClient(v)
		end
	end
	for i, v in pairs(game.Players:GetPlayers()) do		
		if Player2.Value ~= "" then
			if v == Player2 then
				Update:FireClient(v)
			end
		end
	end
end

You can use Instance:FindFirstChild to get something from a name.

if Player1.Value ~= "" then
	local p = game:GetService("Players"):FindFirstChild(Player1.Value)
	if p then UpdateCanvas:FireClient(p) end
end
2 Likes