I have this Surface GUI script here, that I can't get working.
local button = script.Parent plr = game.Players.LocalPlayer tool = game.Lighting("AK-47") function onClick() tool:Clone().Parent = plr.Backpack end button.MouseButton1Click:connect(onClick)
Any kind of help will be greatly appreciated.
local button = script.Parent plr = game.Players.LocalPlayer tool = game:GetService("Lighting")["AK-47"] function onClick() tool:Clone().Parent = plr.Backpack end button.MouseButton1Click:Connect(onClick)
You forgot that Lua's naming system uses square brackets and not parenthesis.