Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What wrong with this?

Asked by 8 years ago

I think its the asset

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 = "http://www.roblox.com/asset?id=341508104"



                end

            end)

        end

    end
end)

0
Still doesnt change the picture however thanks for finding that error :P iSidersz 70 — 8y

1 answer

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
8 years ago

On line 12, you called :lower(), however you're comparing it to a string that has multiple capital letters in it. Change the comparison to:

msg:lower() == "away/orl"
Ad

Answer this question