this script is suppose to god the health of players on touched and dis-appear when not touched
but i think there are some errors
-noviced scripter
script.Parent.Touched:connect(function(hit) if hit.Parent:findFirstChild("Humanoid") == nil then return end script.Parent.Character.Humanoid.MaxHealth = math.huge script.Parent.Character.Humanoid.Health = math.huge end)
The problem is
script.Parent.Character.Humanoid.MaxHealth = math.huge script.Parent.Character.Humanoid.Health = math.huge
You are saying that the scripts Parent is the Player that touched it. What you want is to get the Humanoid from the hit (which you did).
script.Parent.Touched:connect(function(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") if humanoid then -- if humanoid doesn't == false or nil then humanoid.MaxHealth = math.huge humanoid.Health = math.huge end end)
Unless you have the player grouped into a model with a part, I think you'll want to change lines 3 and 4 to
hit.Parent.Humanoid.MaxHealth = math.huge hit.Parent.Humanoid.Health = math.huge