I have this code but this didn't work at all. Example code:
local ExampleTable = {"Player1Name", "Player2Name"}
script.Parent.MouseButton1Click:Connect(function()
if ExampleTable[game.Players.LocalPlayer.Name] then
--Do this
else
--Do this
end
end)
Im basically trying to see if a player's name is inside of my local table.

2 comments
i think its cuz ur putting Player1Name, Player2Name instead of Player1, Player2 ?
I put that because I'm saying "This is where the player's name goes". In the actual game it is the correct name