I have this code here and when I make the part go transparent, it won’t show the particle emitter, but when the part is not transparent, it will show up. (Another thing is that the sound:Play() will work outside the function but won’t work in the function, I think I’m missing something)
game.Workspace.Part.GlassShatter.Enabled = false
local Part = script.Parent
local sound = Instance.new("Sound", game.Workspace.Part)
sound.SoundId = "rbxassetid://5183344180"
Part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
Part.Transparency = .9
Part.CanCollide = false
wait(1)
Part.GlassShatter.Enabled = true
Part.GlassShatter.Rate = 100
Part.GlassShatter.Life = NumberRange.new(1,1)
sound:Play()
end
end)