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)
I messed about with the script in Studio, when it says
script.Parent.HasHit
it, for some reason, doesn't check for a child but rather a property of the part so what I did to resolve this is changing all of the
script.Parent.HasHit
into
script.Parent:FindFirstChild("HasHit")