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

What could I do to make the script say something other than "nil"?

brick=script.Parent

brick.Touched:connect(function(hit)
--Function Here
print("touched")	
end)

i did just as the tutorial said...but it says "nil"

Oh and what does "nil" mean?

1 answer

✓ Accepted answer

Hi snoppy!

Let's first start with the question "What does nil mean?"

ROBLOX Says: nil is a state of non-existence or nothingness

Basically, nil = nothing. Whenever you see nil, it means nowhere, nothing, or not there.

Now, as for your script, everything seems correct at first glance, however try renaming the Part it is in to something like "PartTouch" and try this on line 3:

game.Workspace["New Part name here"].Touched:connect(function(hit) 

What it does:

game.Workspace["New Part name here"] simply indexes the part in one line, and the rest is the same.

1 comment

0

You did really good explaining that! thx :D

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