So I want to make it so that when I touch a brick, that decal will be removed. How could I make it do that? So far I have tried this.
local brick = Workspace.Brick
function onTouch(part) script.Parent:Remove() end
1 | function Touched() |
2 | script.Parent.Decal:remove() |
3 | end |
4 | script.Parent.Touched:connect(Touched) |
Insert this script inside of the brick with the decal. Good job you a beginner scripter! Many people just request scripts but you attempted before you asked! I See a good scripter in the future and his name is awesome9944!
1 | function onHit (player) |
2 | script.Parent.Decal = nil |
3 | end |
4 | script.Parent.Hit:connect(onHit) |