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 7 years ago
Edited 7 years ago

The local script in StarterPlayerScripts and FilteringEnabled is on.

Part of local script:

01local chatspam      = 0
02local totalspam     = 0
03 
04    if chatspam>5 then
05        warn.Visible=true
06        chatspam=chatspam+1
07        totalspam=totalspam+1
08        warn.Text="You have been blocked temporarily for spamming.   WARNING : ".. totalspam.." out of 3"
09        if totalspam>4 then
10            player:Kick("Kicked for repeated spamming")
11        end
12        spawn(5,function() chatspam=chatspam-5 warn.Visible=false end)
13        return
14    end

I found out,

01local chatspam      = 0
02local totalspam     = 0
03 
04    if chatspam>5 then
05        warning.Visible=true
06        chatspam=chatspam+1
07        totalspam=totalspam+1
08        warning.Text="You have been blocked temporarily for spamming.   WARNING : ".. totalspam.." out of 3"
09        if totalspam>4 then
10            player:Kick("Kicked for repeated spamming")
11        end
12        delay(5,function() chatspam=chatspam-5 warning.Visible=false end)
13        return
14    end
0
which line does it say the error occurs in Viking359 161 — 7y

Answer this question