Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

The onTouch will not work whatsoever. How?!?!?

Is this wrong? When I go to touch a brick with a tool, I want a part in the tool to change its transparency. Is this right?

function tch(h)
if (h.Parent.Name == "Burger") then
h.Parent.lettuce.Transparency = 0
end


script.Parent.Touched:connect(tch)










1 answer

Look in your output when debugging
Hi, I'm your friendly neighbourhood error

You missed an end to close your function tch

function tch(h)
  if (h.Parent.Name == "Burger") then
    h.Parent.lettuce.Transparency = 0
  end
end

script.Parent.Touched:connect(tch)

That was easy.

3 comments

0

does not work sorry.

0

You probably want the transparency to be 1, "invisible", not 0, "Completely Visible".

0

^

This discussion is preserved as it was. New answers, comments, and votes are closed.