Trying to make a "Meat processing machine". What's the issue here?
Excuse the silly commentary, but I'm hoping it'll help you figure out what exactly it is I'm trying to do. I'm working on the same game I was 4 years ago, "Eaten by Cats", and I need a brick to change color when it touches the parent of this script but it refuses. The script doesn't seem to be throwing any errors of any kind, even when I enable debug.
01 | function onTouched(Meat) |
02 | local oldmesh = Meat:FindFirstChild( "Mesh" ) |
03 | if oldmesh ~ = nil then |
06 | local Decal = Meat:FindFirstChild( "Decal" ) |
09 | local Decal = Meat:FindFirstChild( "Decal" ) |
12 | local Humanoid = Meat.Parent:FindFirstChild( "Humanoid" ) |
13 | if Humanoid ~ = nil then |
16 | if Meat.Name ~ = "Head" then |
19 | Meat.Material = "Granite" |
20 | Meat.Cancollide = true |
21 | Meat.BrickColor = Color 3. fromRGB( 255 , 148 , 148 ) |
23 | script.Parent.Touched:connect(onTouched) |