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

LUA-- 'end' expected (to close 'function' at line 6) near '<eof>' HELP? [closed]

Asked by
FedrixYT -21
7 years ago

i need help because whenever i test it the output says Workspace.buy ak47.Script:16: 'end' expected (to close 'function' at line 6) near '<eof>'


if game.Players.LocalPlayer then local player = game.Players.LocalPlayer local currency = player:WaitforChild('leaderstats').Money local amount = 1100 local tool = game.Lighting["AK-47"] script.Parent.ClickDetector.mouseClick:connect (function(plr) if currency >= amount and not player.Backpack:FindFirstChild('AK-47') or player.Character:FindFirstChild('AK-47') then currency.Value = currency.Value - amount local newtool = tool:Clone() newtool.Parent = plr.Backpack

end
1
Please put your code in a code block. Thanx. c; TheeDeathCaster 2368 — 7y
0
We're not your code monkeys. Explain what you're trying to do, and what is or isn't happening. Don't just throw code at us, also format your code correctly in Lua code block. Goulstem 8144 — 7y

Closed as Non-Descriptive by Goulstem

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?