Hello,
Long story short, I’m trying to create a brick that changes a value within the Player when they step on it. However, when the Player steps on the brick, the value does not change.
Script inside of the brick
The Player with values inside

How can I rectify this?
Thanks.
Is the script a local script or server script? Are you viewing the values from the server side or client side perspective?
Can you confirm that the script is running with a print statement?
Can you confirm PlayerValues is within the player during the time that the script is running?
To do this you add Get Children, or put it in a repeating loop inside task.spawn which I use to verify :WaitForChild functions.
print(Players:GetChildren())
It is a server script, and I have been viewing the values on the client side.
While the test is running, I can see all the values within a folder “PlayerValues” within my Player.
A print statement does work when stepping on the brick.
Upon printing all the children of my player, the PlayerValues folder shows up.
You can do Hit.Parent.Parent Which I believe would get the player who touched the brick
Any errors on output or nils?This text will be blurred
No errors or nils in the output.
Can you try this then? It worked for my numbervalues (and intvalues).
script.Parent.Touched:Connect(function(__HIT)
local __PLR = game:GetService("Players"):GetPlayerFromCharacter(__HIT.Parent)
if __PLR ~= nil then
__PLR:FindFirstChild("PlayerValues"):FindFirstChild("OxygenValue").Value = 100
end
end)