There are no errors, it also does not print "work" so I think its when you touch it
config = script.Parent.Configuration damage = config.Damage damageinterval = config.DamageInterval imageparticle = config.ImageParticleAddress dying = false debounce = false function onTouched(hit) --When Touched print("work") if debounce == false then debounce = true local human = hit.Parent:FindFirstChild("Humanoid") if human then game.ReplicatedStorage.Damage:Clone().Parent = hit.Parent.Torso hit.Parent.Torso.Damage.Texture = imageparticle.Value dying = true damagingfunc(human) --Launches function end end end function offTouched(hit) local human = hit.Parent:FindFirstChild("Humanoid") if human then if hit.Parent.Torso:FindFirstChild("Damage") then hit.Parent.Torso.Damage:Destroy() end dying = false debounce = false end end function damagingfunc(human) local health = game.Players:GetPlayerFromCharacter(human.Parent).stats.health while dying == true do health.Value = health.Value - damage.Value wait(damageinterval.Value) end end script.Parent.Touched:connect(onTouched) script.Parent.TouchEnded:connect(offTouched)
First Check: Is it in one of these places?
A LocalScript will only run Lua code if it is a descendant of one of the following objects:
A Player's Backpack, such as a child of a Tool
A Player's Character model
A Player's PlayerGui
A Player's PlayerScripts
The ReplicatedFirst service
Note: the parent of the LocalScript will determine which client the Lua code will be executed on.
As stated on: http://wiki.roblox.com/index.php?title=API:Class/LocalScript
Second Check: Nothing seems to be wrong with your code, has it worked before?