I have a game that uses FindFirstChild() to give the player money when they touch a brick. It results with an error but still works. My code is something like this (not exact cause I am on mobile and doing it off my head):
local denounce = 0
script.Parent.Touched:connect(function(player)
If debounce == 0 then
debounce = 1
local plr = player:GetPlayerFromCharacter()
local stats = plr:FindFirstChild('leaderstats')
local value = stats:FindFirstChild('Money')
value.Value = value.Value + 100
wait(5)
debounce = 0
end
Thanks, JailBreaker_13

2 comments
Why did you close my question for not being constructive? Everyone has their own issues and problems and sometimes they don't know where to start. You blatantly removed my question for "not being constructive enough" which left me with a negative 5 reputation. Everyone starts from somewhere and YOU are not acknowledging that.
I'm sorry if you are upset, but I was just doing my job, thank you for your feedback, I will take this into consideration when moderating. It was not just me who thought it was not constructive, there are many others that voted on it as well.