I have a local script:
1 | script.Parent.Activated:Connect( function (p) |
2 | local cash = p.leaderstats.DepressionCoins.Value |
3 | if p > = 300 then |
4 | p = p - 300 |
5 | end |
6 |
7 | 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
1 | local p = game.Players.LocalPlayer |
2 |
3 | script.Parent.Activated:Connect( function () |
4 | local cash = p.leaderstats.DepressionCoins |
5 | if cash.Value > = 300 then |
6 | cash.Value = cash.Value - 300 |
7 | end |
8 |
9 | end ) |