How can I make this script make exactly 1 Mesh and not multiple Meshes.
Player = game.Players.LocalPlayer Char = Player.Character RA = Char["Right Arm"] function RightArm(Part) Mesh = Instance.new("SpecialMesh", RA) Mesh.MeshId = "http://www.roblox.com/asset/?id=25212400" Mesh.MeshType = "FileMesh" Mesh.Scale = Vector3.new(1, 2.05, 1) Mesh.TextureId = "http://www.roblox.com/asset/?id=41988084" OriginalColor = RA.BrickColor RA.BrickColor = BrickColor.new("Light Orange") wait(1) RA.BrickColor = OriginalColor Mesh:Remove() end RA.Touched:connect(RightArm)
You just have to make a check to see if the mesh already exists or not.
Player = game.Players.LocalPlayer Char = Player.Character RA = Char["Right Arm"] function RightArm(Part) if not RA:findFirstChild("Mesh") then -- This is the check Mesh = Instance.new("SpecialMesh", RA) Mesh.MeshId = "http://www.roblox.com/asset/?id=25212400" Mesh.MeshType = "FileMesh" Mesh.Scale = Vector3.new(1, 2.05, 1) Mesh.TextureId = "http://www.roblox.com/asset/?id=41988084" OriginalColor = RA.BrickColor RA.BrickColor = BrickColor.new("Light Orange") wait(1) RA.BrickColor = OriginalColor Mesh:Remove() end end RA.Touched:connect(RightArm)