Trying to make decal appear when touched a character part

What do you want to achieve?
a decal to appear on which part of character is touched

  1. What is the issue? Include screenshots

the script does work it’s that when it touches a part it puts a decal on it too

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

ive tryed it to detect if hit name is left arm or right arm or torso , ya get da point

Check if the hit has a humanoid

1 Like

alrighty ( char ugghwadefsgdjfmgj)

like this?

charararararararah

Quick dev fourm tips one if you need more chracters if uou type one of these < then put alot of letters on them yhen close thrm with this character > spaces and numbrrs don’t work. And if you problem is a code problem copy and paste your code into 3 of these then close them with 3 of these.

No like this if hit.Parent:FindFirstChild("Humanoid") then

but how will it find the parts to detect where to put the decal

move the print, wait, and debounce to outside of the checks of the wha value, use “print(wha)” for the print, use “if hit.Parent:FindFirstChild(“Humanoid”)” instead, and remove the beginning wha set, that should make it readable

You do the if statement after check if the hits parent has a humanoid (to check if is a players character)

1 Like

like this?

No check its parent so rather then hit:FindFirstChild do hit.Parent :FindFirstChild

1 Like

it worked thank you so much!!!

1 Like

Algood happy developing!

1 Like
if hit.Name=="Left Arm" or "Right Arm" or "Torso" or "Left Leg" or "Right Leg" then

This statement is always true.
[explaination] That’s because the string “Right Arm” is not nil and not false.

This is likely what you intended to do:

if hit.Name=="Left Arm" or hit.Name=="Right Arm" or hit.Name=="Torso" or hit.Name=="Left Leg" or hit.Name=="Right Leg" then

You must perform a comparison between hit.Name and each string, which will return either true or false.

1 Like