So I think I already know the issue, I’m just a little unsure as to how to get around it. Basically everything works but 2 things. I have a gui that keeps track of how many things you harvest (ranging from strawberries to onions etc) Anyways.
Everything is working alright except 2 things.
I have a leaderboard within the player that houses the IntValues of how many items you harvest. And I have a DataStore that’ll save said values. The issue lies either in the harvesting itself or the player HUD.
The script is simple. When the proximity trigger is pressed, It adds +1 to the IntValue (of the correct produce, in this case Cabbage).
But for some reason it isn’t actually adding it. I’m getting no errors- I mean, technically no visible errors. For some reason the “Triggered” part of “script.Parent.Triggered:Connect(…” is underlined yellow and is stating, “Not Found In Class Script”. Which maybe I’m missing something but the script below IS correctly parented under this Proximity Prompt AND it does tell me “Cabbage Added” when the script is complete. So im just torn as to why it isn’t working.
NOTE: Both these scripts are Local Scripts & Separate.
Harvest Script (Found inside the proximity prompt within the model in the game):
local CabbageCount = game.Players.LocalPlayer.ProduceNumberFolder.CabbageCount
script.Parent.Triggered:Connect(function(player) -- this Triggered underlined yellow
CabbageCount.Value = CabbageCount.Value + 1
print("Cabbage Added")
end)
and Idk if this is really the issue because regardless the intvalue isn’t rising. Only reason I’m adding it because the script below doesn’t work (correction it works but not as intended); Mainly because the IntValue isn’t updating.
this script merely just takes a look at the produce # and then projects it onto the text icon within the player script:
local CabbageValue = game.Players.LocalPlayer.ProduceNumberFolder.CabbageCount
while wait(.5) do
script.Parent.Text = CabbageValue.Value
print("Cabbage Set") -- This does show up in the Output but it doesn't actually show in game or in editor.
wait(.5)
break
end
side note: I do have to run somewhere so if you reply and I don’t respond right away- please don’t be mad! I am grateful for your time to look at my issue :D, this community is a life saver lol.