I've seen it in many roblox lightsaber games, you swing across the wall with a lightsaber and it leaves a glowing stripe on the wall. I've been working on making my own lightsabers lately and wanted to add this effect too, I have tried a few methods of me but they worked out really ugly or not working.
One of my ideas was making small parts in a row along the blade with in every part a script that would enable a particle effect on Touch and and disable it on TouchEnded. When I tried some parts in the blade didn't stop the melting effect. To conclude: using Touch events didn't seem like an option.
btw here is the script I used if interested:
local melt = script.Parent.MeltParticle
script.Parent.Touched:Connect(function(hit)
if hit.Name ~= "Blade" then
if hit.Material == Enum.Material.Concrete then
melt.Enabled = true
end
if hit.Material == Enum.Material.Air then
melt.Enabled = false
end
end
end)
script.Parent.TouchEnded:Connect(function(hit)
if hit.Name ~= "Blade" then
melt.Enabled = false
end
end)
Does anyone know how they did that in those games?

2 comments
you could try unionasync to make it actually cut a hole into the surface instead of just leaving a decal. Just a suggestion though.
Yeah thx for the suggestion. however I wasn't planning on making decals. I wanted it to be dynamic