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.
u have to use .Value for values. example:
local RoundEndV = game.Lighting.Variables.HandleGameVariables.RoundEnd local PickV = game.Lighting.Variables.ActiveGameVariables.Pick.Value--changed to value. local localPlayerN = game.Players.LocalPlayer.Name RoundEndV.Changed:Connect(function() if RoundEndV.Value == true then print(localPlayerN) -- For Testing print(PickV) -- 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)