PickV is the person who is picked/holding the object.
local RoundEndV = game.Lighting.Variables.HandleGameVariables.RoundEnd
local PickV = game.Lighting.Variables.ActiveGameVariables.Pick
local localPlayerN = game.Players.LocalPlayer.Name
RoundEndV.Changed:Connect(function()
if RoundEndV.Value == true then
print(localPlayerN) -- For Testing
print(PickV.Value) -- For Testing
if localPlayerN == PickV then
script.Parent.RoundWin.Visible = true
print("Round Win")
elseif localPlayerN ~= PickV then
script.Parent.RoundLose.Visible = true
print("Round Lose")
end
end
end)
I'm not sure why my script is showing the lose screen instead of the win screen. When I do my tests the two prints are the same value... I hope you can help me, I have posted this before but my problem is slightly different.

6 comments
The script is a local script in a gui.
What kind of data do the Values hold? The name? The player object itself? If they're not the same type, they'll never be equal.
My script is saying if the player's name is the same as the winner's then the gui will say "you won".
The values hold string values. One is the player's name and the other is a string value. Do I need to use a different kind of variable?
If the values hold strings too, make sure they don't have extra spaces or anything, then. Print their length. Something is fishy here if they actually show you the "same" value but actually aren't.
move the variables into replicated storage. Replicated storage was created for a reason