Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[Question] Make Clothes Show when Invisible?

Asked by
CPF2 406 Moderation Voter
6 years ago

I looked it up on the wiki, but I can't seem to find if this is possible, I was thinking of making a script where it turns your character invisible, but your clothes still show, similar to if a decal was on an invisible part.

0
I don't believe there's any way to do this without some highly advance scripts but then again I don't know VeryDarkDev 47 — 6y
0
Before I look into this, I'd like to address my curiosity first; why would you like to accomplish this? T0XN 276 — 6y

1 answer

Log in to vote
0
Answered by
mattscy 3725 Moderation Voter Community Moderator
6 years ago
Edited 6 years ago

The only way I can think of to accomplish this is with ImageLabels, Frames and SurfaceGuis (although it is a potentially "hacky" solution).

If you created a new SurfaceGui for each face on each of the character's body parts, you can set their CanvasSize to the size of the face on the shirt in pixels (which you can check on the shirt template, not sure how big they are off the top of my head). For example, if the front section of the torso on the shirt template is 100x100 pixels, you would set the CanvasSize of the SurfaceGui on the front of the character's torso to this size. You would then repeat this for every face on all their bodyparts with clothing.

Then, inside each SurfaceGui, you could add a single Frame that had its size set to {1,0}, {1,0} and ClipsDescendants to true. Inside each frame you could add an ImageLabel, each with the image of the shirt template. Then, you can work out the exact size and positions required for the ImageLabels within the frames to allow for them to only show the appropriate image for each face. For example, for the front of the torso, you might find that the image is located 500 pixels across and 300 pixels down on the shirt template. You would then set the image's position to {0,-500}, {0,-300} to position it at this location, and then resize it so only that section of image is visible. Repeating this process for all bodyparts would form the shirt based only off the template image. You may also be able to achieve this result with a combination of ImageRectOffset and ImageRectSize and without a frame, but it's up to you to choose whatever is easiest.

You should also keep in mind that this will not wrap the shirt around bevels or packages (effectively removing the package from the character if the rest of them is invisible). To simplify the process (especially for R15), you could have a table of offsets and sizes based off each face on each body part, and index that.

Sorry for the essay, hopefully this works out.

EDIT: If you are going to attempt this, make sure the BackgroundTransparency of the ImageLabel is set to 1 for the transparent sections of the template to work properly.

0
I am going to attempt this, I was thinking of something like this, but i wasn't sure how to go about it, thanks for replying, I really didn't think anyone would help me CPF2 406 — 6y
0
Sadly, this didn't work, it was working for quite a bit, but then all of a sudden, the top faces were rotated the wrong way, and when i tried to rotate them correctly, it took off the canvas size effect (how it crops out the rest of the image not on the canvas). CPF2 406 — 6y
0
Did you rotate the frame rather than the image label? mattscy 3725 — 6y
Ad

Answer this question