function onTouched(hit) if hit.Parent:FindFirstChild("Humanoid") then local character = hit.Parent local plr = game.Players:GetPlayerFromCharacter(character) if plr then plr.PlayerGui.Hull.Value.Value = plr.PlayerGui.Hull.Value.Value +1 wait(5) end if plr.PlayerGui.Hull.Value.Value == 100 then script.Disable = true wait(5) script.Disabled = false end end end
script.Parent.Touched:connect(onTouched)

3 comments
What exactly are you trying to do, and what is happening instead? Is there any output? Also, put your code in a code block (that little blue Lua symbol)
Don't use disabled to control scripts. It definitely doesn't make sense to disable the current one, since it won't be able to reactivate itself.
I'm trying to make a counter that won't go above acertain value.