So, this system is meant to work so that if the player is whitelisted in the script, when they click the model in workspace, it'll give them the GUI. If they're not whitelisted, it prints that the player doesn't have the license, and doesn't give the GUI. So, the issue I'm having is that its not recognizing the player names in the whitelist. The script prints the "Player not allowed" every time I click it, when my character name is in the script.
script.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked)
if playerWhoClicked.PlayerGui:FindFirstChild("ShopGui") == nil then
if playerWhoClicked.Name == {"alexduskthorn", "Player1"} then
print ("Player has license")
local gui = script.ShopGui:Clone()
gui.Parent = playerWhoClicked.PlayerGui
gui.Frame.Main.Disabled = false
else
print ("Player does not have license")
end
end
end)
