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

[SOLVED] Why is attempt to call a number value?

Asked by 6 years ago
Edited 6 years ago

The local script in StarterPlayerScripts and FilteringEnabled is on.

Part of local script:

    local chatspam      = 0
    local totalspam     = 0

        if chatspam>5 then
            warn.Visible=true
            chatspam=chatspam+1
            totalspam=totalspam+1
            warn.Text="You have been blocked temporarily for spamming.   WARNING : ".. totalspam.." out of 3"
            if totalspam>4 then
                player:Kick("Kicked for repeated spamming")
            end
            spawn(5,function() chatspam=chatspam-5 warn.Visible=false end)
            return
        end

I found out,

    local chatspam      = 0
    local totalspam     = 0

        if chatspam>5 then
            warning.Visible=true
            chatspam=chatspam+1
            totalspam=totalspam+1
            warning.Text="You have been blocked temporarily for spamming.   WARNING : ".. totalspam.." out of 3"
            if totalspam>4 then
                player:Kick("Kicked for repeated spamming")
            end
            delay(5,function() chatspam=chatspam-5 warning.Visible=false end)
            return
        end
0
which line does it say the error occurs in Viking359 161 — 6y

Answer this question