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

return value.property? Idk rip

Asked by 5 years ago

Hello! I recently found this code in one of our dev's work:

local getResult = game.ReplicatedStorage:WaitForChild("MSG_FUNCTIONS"):WaitForChild("MSG_CHECKCALLBAN"):InvokeServer()

if getResult.callbanned == true then        
    showModCallbanned()
end

Now, my question. How does he return something like "callbanned"? I use return value, but what does he do?

0
We do not know what callbanned or get result or show mod call banned is... greatneil80 2647 — 5y
0
No need to. It are variable names. marketmanager1 52 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

It looks like the remote function is returning a table. It could be as simple as { callbanned = true } or it could contain other properties as well. You can iterate over getResult to see what it contains like so:

for k, v in pairs(getResult) do
    print("key:", k, "value:", v)
end
Ad

Answer this question