Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Expected (to close '(' at line 1) near 'game'?

I am trying to make a command that gives you a gear but Im getting an error msg "Players.Player1.PlayerGui.Admin.Commands.Gear.Gear.LocalScript:13: ')' expected (to close '(' at line 1) near 'game'" What does this mean?

script.Parent.MouseButton1Click:connect(function()

local ID = script.Parent.Parent.ID.Text
local PlayerName = script.Parent.Parent.Number.Text

x = game:GetService("InsertService"):LoadAsset(ID)
for i,v in pairs(x:GetChildren()) do
v.Parent = game.Players[""..PlayerName..""].Backpack
end
x:Remove()
end

game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
    Text = "[ADMIN] Given Gear to "..PlayerName;
    Color = Color3.new(40,59,75); 
    Font = Enum.Font.SourceSans;
    TextScaled = true 
})
end)

1 comment

0

You have an extra end on line 11.

1 answer

It might be the end at line 11, "for" and the "function" at line 1 are the only lines that should have ends.

This discussion is preserved as it was. New answers, comments, and votes are closed.