Okay, so I'm making a game based off of Cookie Clicker, so I require a cookie that needs to be clicked that gives you a 'Click' every time the button is clicked.
My script so far is this:
local cookie = script.Parent
cookie.MouseButton1Click:Connect(function()
game.Players.LocalPlayer.leaderstats.Clicks = game.Players.LocalPlayer.leaderstats.Clicks + 1
end)
It's in a local script, and all lines of the script are correct. My output error is:
Players.dxrrevn.PlayerGui.ScreenGui.MAINBG.Frame.ImageButton.AddCookieScript:4: attempt to perform arithmetic (add) on Instance and number - Client - AddCookieScript:4>
I'm unsure on how to rectify this problem, any help would be greatly appreciated.
Thanks, dxrrevn
