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

Whats wrong with this?

Asked by 8 years ago
local isAdmin = {["iSidersz"] = true, ["name"] = true, ["name"] = true}
Var = game.Workspace.Intros
function findPlayer(name)
    for _, player in ipairs(game.Players:GetPlayers()) do
        if player.Name:lower() == name:lower() then
            return player
        end
    end
end

function onChatted(message, player)
    if message:sub(1, 5) == "Intro" and isAdmin[player.Name] then
 local m = Instance.new("Message")
                m.Parent = game.Workspace
    m.Text = "Welcome to the Winter classic!"
    Var.IntroSounds.Back:play()
    wait(5)
    Var.IntroSounds.One:play()
    wait(5)
    m.Text = "In Tonights matchup your visiting team the " .. game.Workspace.Variables.AullName.Value .. "!"
    wait(30)
    m.Text = "And now your very own " .. game.Workspace.Variables.HullName.Value .. "!!!!"
    wait(5)  
    m:remove()          

        end
    end



game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(message) onChatted(message, player) end)
end)
1
Asking "Whats wrong with this" will not get any responses. Are there any errors? Have you tried to debug yourself? Set up prints, and find where it stops printing/ Shawnyg 4330 — 8y

Answer this question