I have a local script:
script.Parent.Activated:Connect(function(p) local cash = p.leaderstats.DepressionCoins.Value if p >= 300 then p = p - 300 end end)
I thought p would mean the parent of whoever clicked it but it didn't. Can someone help?
(insert something i need to say here)
use game.Players.LocalPlayer
if you are trying to subtract coins from the player do dis
local p = game.Players.LocalPlayer script.Parent.Activated:Connect(function() local cash = p.leaderstats.DepressionCoins if cash.Value >= 300 then cash.Value = cash.Value - 300 end end)