Help with values


The value does not seem to go down any solutions?

Youre looking for “health”, when the value is actually named “Health”
And also, youre looking in the touched parts parent, which means you would have to either parent the value to the mesh parts parent, or remove the .Parent

script.Parent.part.Touched:Connect(function(touch)
print(“tocuh”)
touch:WaitForChild(“Health”).Value = 0
end)?

1 Like

Yeah, thats correct

this is why we need emoji reactions like thumbs up

Still doesn’t work though. Any other ideas?

Can you show the explorer and where the script that handles the touch event is located?
I gtg ill be back soon

Always make sure capitalization is correct, this may be why (and also check the output for any errors)

Perhaps is one script a local script and the other script is a server script.

script.Parent.Part.Touched:Connect(function(hit)
print(“touch”)

local parent = hit.Parent
if not parent then return end


local health = parent:FindFirstChild("Health")
if health and health:IsA("NumberValue") then
	health.Value = 0
end

end)

is the updated one

1 Like

They are both scripts. Not local

I did some testing, It just is not changing the value. Everything else is in the script is working

Does Handle have CanQuery or CanTouch disabled? Make sure you enable both.