When a player interacts with this ProximityPrompt, I want it to check if the player has more than 10 “Friends”, (the leaderstat), and if they do, then I’d like their leaderstat value to go down by 10, and do some extra stuff which already works.
There is no error message in the output, but nothing happens when I interact with the proximityprompt.
I looked around and revised a bit, but nothing really, here is my script so far:
workspace.NoobStuff.NoobProxPrompt1.ProximityPrompt.Triggered:Connect(function(bought)
local friends = bought:WaitForChild("leaderstats").Friends
if friends.Value >= 10 then
workspace.NoobStuff.NoobBought1.Transparency = 0
workspace.NoobStuff.NoobProxPrompt2.ProximityPrompt.Enabled = true
workspace.NoobStuff.NoobProxPrompt1.ProximityPrompt.Enabled = false
friends.Value =-10
end
end)
Any help would be appreciated as I am not very experienced with scripting. Thanks