Changing Player's Material

I attempted to script a death animation similar to the one in SB2 but I can’t change the player’s parts to neon. How do I fix this

2 Likes

This seems to be possible with R6 but not R15

can i see your code

Make sure you are searching for part:IsA(“BasePart”) in your search, not just part:IsA(“Part”). R15 is nearly all mesh objects. (This is assuming you are doing a for n,x in pairs(character:GetChildren()) do loop)

I’m pretty sure SB2 makes a dummy character and does its fragmentation effect off that dummy character.

I searched for CharacterMesh

CharacterMeshes are not affected by material.

Then its not possible?

Correct, meshes only work with Materials if you’re using MeshParts.

It is possible, the R15 Character is composed of Meshpart and part classes check the character for both parts and meshparts. You can set their materials respectively. You can also turn normal parts with mesh classes into meshparts using their mesh and texture IDs respectively.

Example of your basic R15 character: https://i.gyazo.com/f8aff97e5285812dd1fe1bcc50d37ca0.png

1 Like

Yeah, like clone said, you would do

for i, v in pairs(Character:GetChildren()) do
    if v:IsA(“BasePart”) then
        —Part manipulation stuff
    end
end

for example, to get all the MeshParts and anything inheriting BasePart inside of the character.

2 Likes