script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) local plrLeader = player.leaderstats plrLeader.Tokens = plrLeader.Tokens + 1 end end)
OUTPUT: attempt to perform arithmetic (add) on Instance and number
Because Tokens is an IntValue(Instance). To get the value of the IntValue do; plrLeader.Tokens.Value
.
script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) local plrLeader = player.leaderstats plrLeader.Tokens.Value = plrLeader.Tokens.Value + 1 end end)