Face decal copy block script not functioning?
Asked by
5 years ago Edited 5 years ago
I have a script that when you touch a block named something, it puts the decal of the touched block on your face of the player.
The script goes in the serverscriptstorage but doesn't seem to work.
I got help the other day on getting where I am now and I appreciate those efforts, but if anyone could help getting this script operational that would be great!
Any feedback is great and thank you in advance!
Maybe I should switch the order of the functions?
02 | local decals = game.Workspace:GetDescendants() |
04 | for i,v in pairs (decals) do |
06 | if v.Parent.Name = = "FaceChanger" then |
07 | v.Touched:Connect( function (hit) |
16 | if hit.Parent:FindFirstChild( "Humanoid" ) ~ = nil then |
17 | local head = hit.Parent:FindFirstChild( "Head" ) |
19 | local face = head:FindFirstChild( "face" ) |
20 | if face.Texture ~ = getDecal().Texture then |
21 | face.Texture = getDecal().Texture |
27 | script.Parent.Touched:Connect(onTouch) |