This is script is supposed to make a THIRSTGUI go up when I touch ANY brick with the name water. However, it doesn't work. It has no errors in console. This is a LOCAL SCRIPT.
local block = "Water" wait(1) local debounce = false local thirst = game.Players.LocalPlayer:WaitForChild("ThirstVal") repeat wait() until game.Players.LocalPlayer.Character local character = game.Players.LocalPlayer.Character game.Players.LocalPlayer.Character.HumanoidRootPart.Touched:connect(function(p) if p.Name == block then thirst.Value = thirst.Value + 10 if thirst.Value > 100 then thirst.Value = 100 end end end)