Hello, I made a script that would active smoke inside a part, but for some reason it won't work anymore. This is a ServerScript.
script.Parent.Touched:Connect(function(Part)
if script.Parent.HasHit.Value == false then
script.Parent.HasHit.Value = true
script.Parent.Anchored = true
script.Parent.Smoke.Enabled = true
wait(30)
script.Parent:Destroy()
else
wait()
end
end)

5 comments
What do you mean by not work anymore? Do you mean it doesnt work in general?
Nothing happens in the script. I even tried making it print a string when activated, that doesn't work.
The script isn't disabled, so I don't understand what's going on.
Ensure that your HasHit BooleanValue is set to False. Also, your .Touched event will fire when anything touches it(including parts around the world), so you should make sure that whatevers touching the part is indeed a player..
Any errors in the output?