I've been making a total click counter and for some reason when I test the game the click counter won't work and there will be an error stating
"Players.MLG_Gamer9876.PlayerGui.GUI.counter:3: attempt to perform arithmetic on field 'Text' (a string value)"
and I have no idea what that means, but here's the script...
local text = script.Parent.totalclicks script.Parent.click.MouseButton1Click:Connect(function() text.Text = "Total Clicks:"..text.Text + 1 end)
You are trying to add a number to a string value. You have to convert the text to a number first to perform math operations. It should look like this:
local text = script.Parent.totalclicks script.Parent.click.MouseButton1Click:Connect(function() text.Text = tostring(tonumber(text.Text) + 1) end)
tonumber converts string to number and tostring does the opposite. (In this case tostring is not really necesarry. It's just for better understanding.)