Here is the problem I need this value to get bigger when a specific player touches a part. script
Coins = 50
function onTouch(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
Coins = +4
end
Here is the problem I need this value to get bigger when a specific player touches a part. script
Coins = 50
function onTouch(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
Coins = +4
end
You need Coins = Coins + 4. You assign Coins to the value of Coins plus 4.
Also, you need an additional end (for the function) and ~= nil is unnecessary.
This discussion is preserved as it was. New answers, comments, and votes are closed.