title: What does "attempt to index function with 'Connect'" mean in Roblox?
body: <pre><code>local Player = game.Players.LocalPlayer
  local PlayerCash = Player:WaitForChild(&quot;leaderstats&quot;):WaitForChild(&quot;Strength&quot;)
  local Mouse = Player:GetMouse()
  local amount = 50
  
  script.Parent.Activate:Connect(function()
  game.Players.LocalPlayer.leaderstats.money.Value = game.Players.LocalPlayer.leaderstats.money.Value  + amount
  end)
  </code></pre>
  <p>I am trying to make a code to give Strength when you click. When I press 'Play' it doesn't work. All it says in the output is
  'attempt to index function with 'Connect'.'</p>