in Lua if statements needs to have then after the condition, like this
if (something) then
local A_1...
...
You need to add one in your case
...
for i,v in ipairs(game.ReplicatedStorage.API:GetChildren()) do
if v:IsA("RemoteFunction") then
local A_1 = "BlaBla"
local A_2 = owner
v:InvokeServer(A_1, A_2)
end
end
end is also necessary, otherwise it will error too.
Here is Lua documentation on if statements.
Also when getting player from Players, it's good to use FindFirstChild as for example this user will break the function as it will call GetPlayers method.
local name = "BlaBla"
local owner = game:GetService("Players"):FindFirstChild(name)
This will make sure the player is child and not property/method.
2 comments
Thanks so much it's worked
Set his reply to an answer