what im trying to do is make it where people can click other player's character models, and themselves

using a click detector worked but only made it so they can click others.

this was my first script. it works while clicking other players, except that it makes the UserInfo.Text changed on the player that was clicked on also, which i don't want.

local gui = script.Parent.ScreenGui.Frame
local UserInfo = gui.UserInfo

for i,v in pairs(game.Players:GetPlayers()) do
    v.Character:WaitForChild("ClickDetector").MouseClick:Connect(function(clicked)
        UserInfo.PlayerClicked.Value = clicked.Name
    end)
end


UserInfo.PlayerClicked.Changed:Connect(function()
    UserInfo.Text = "User Info: "..UserInfo.PlayerClicked.Value..""
end)

if you don't understand this, let me know. I'm kinda tired right now so it might not be a good explanation