Heres what I have so far?
local Permitted = {"iSidersz", "Player"} local ALogo = game.StarterGui.Scoreboard.Frame.AwayLogo local HLogo = game.StarterGui.Scoreboard.Frame.HomeLogo game.Players.PlayerAdded:connect(function(plr) for i,v in pairs(Permitted) do if v:lower() == plr.Name:lower() then plr.Chatted:connect(function(msg) if msg:lower() == "away/orl" then ALogo.Image = script.Parent.orli.ID end end) end end end)
~~~~~~~~~~~~~~~~~
One change to the code I made is using a different variation of the for loop. Another problem I see in your code is you are trying to set "game.StarterGui.Scoreboard.Frame.AwayLogo" & "game.StarterGui.Scoreboard.Frame.HomeLogo". I would recommend using this instead
local Permitted = {"iSidersz", "Player"}; --local ALogo = game.StarterGui.Scoreboard.Frame.AwayLogo; --local HLogo = game.StarterGui.Scoreboard.Frame.HomeLogo; game.Players.PlayerAdded:connect(function(plr) for i = 1, #Permitted do if plr.Name:lower() == Permitted[i]:lower() then plr.Chatted:connect(function(msg) if msg:lower() == "away/orl" then for a,b in pairs(game.Players:GetChildren()) do b.PlayerGui.Scoreboard.Frame.AwayLogo.Image = script.Parent.orli.ID; end; end; end); end; end; end);
This code will go through and take each and every player from "game.Players" and open their PlayerGui and find the scoreboard and change the value there instead of trying to change the one in StarterGui.