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

Trying to make a "Meat processing machine". What's the issue here?

Asked by 3 years ago

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.

01function onTouched(Meat)                        --Eww, something touched me!! I'm gonna call it "Meat".
02    local oldmesh = Meat:FindFirstChild("Mesh") --Was it something with a Mesh?
03        if oldmesh ~= nil then                  --WAS IT???
04            oldmesh:Remove()                    --EWW IT'S LUMPY REMOVE THE MESH
05        end
06    local Decal = Meat:FindFirstChild("Decal"--Is there a Decal here?
07    if Decal ~= nil then                    --Just in case there is...
08    Decal:Remove()                          --KILL IT.
09    local Decal = Meat:FindFirstChild("Decal"--Is there a Decal here?
10    end
11 
12    local Humanoid = Meat.Parent:FindFirstChild("Humanoid")
13    if Humanoid ~= nil then
14        Humanoid.Health = 0
15    end
View all 25 lines...

1 answer

Log in to vote
2
Answered by 3 years ago

On line 20, its CanCollide, not Cancollide!

0
Thank you! I still need help with the colors, though. sethpaw 2 — 3y
0
Meat.Color = Color3.fromRGB(yourcolor), you cant use brickcolor here Gmorcad12345 434 — 3y
0
Meat.Color = Color3.fromRGB(yourcolor), you cant use brickcolor here Gmorcad12345 434 — 3y
0
Meat.Color = Color3.fromRGB(yourcolor), you cant use brickcolor here Gmorcad12345 434 — 3y
View all comments (2 more)
0
Meat.Color = Color3.fromRGB(yourcolor), you cant use brickcolor here Gmorcad12345 434 — 3y
0
what the heck why are there 4 of my comments Gmorcad12345 434 — 3y
Ad

Answer this question