What do you want to achieve? Keep it simple and clear!
I want to do that when the proximity prompt is triggered remove everything from a value and update the leaderstats
What is the issue? Include screenshots / videos if possible!
The script doesn’t seem to work at all
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried shearching or changing the script but yet no solution
Here is the script
script.Parent.Triggered:Connect(function(plr)
local Cash = plr.leaderstats.Money.Value
local V1 = plr.PlayerGui.ScreenGui.Inv.AStone.BTexts.BNumber.Value.Value
Cash = Cash + (V1*10)
V1 = 0
end)
Script is in proximity prompt and is not a LocalScript
It may require being a local script. And in order to get the data on the server you would need to create a remote event and send the data to be processed on the server. Idk honestly I’d have to test out a proximity prompt to be certain. You could pop a print statement into the function and see if it prints. This would at least tell you the function is being run.