iBrandyn
|
  |
| Joined: 30 May 2013 |
| Total Posts: 1699 |
|
|
| 21 Jun 2013 08:49 PM |
Hi,
I'm learning scripting. I tried to do this script, but I am unsure. I know I did something wrong where it says ":FindFirstChild(Humanoid)" but I'm unsure. Help?
function doFlicker(hit) -- Function that flickers brick once. if hit.Parent:FindFirstChild(Humanoid) ~= nil then -- Is it a person? If so, continue. local paart = game.Workspace.Part -- Makes it easier to call the brick. paart.Transparency = 1 -- Invisible. wait(1) -- Wait 1. paart.Transparency = 0 --Visible end --Done end --Done
game.Workspace.Part.Touched:connect(doFlicker) --Connect to function "doFlicker".
(Workspace has; brick named Part, Camera, Terrain, and BasePlate.) (Output says "Arguement is missing or nil on line 2)
Thanks if you can help me!
—ɪBʀᴀɴᴅʏɴ |
|
|
| Report Abuse |
|
|
| 21 Jun 2013 08:50 PM |
| if hit.Parent:FindFirstChild("Humanoid") ~= nil then -- Is it a person? If so, continue. |
|
|
| Report Abuse |
|
iBrandyn
|
  |
| Joined: 30 May 2013 |
| Total Posts: 1699 |
|
|
| 21 Jun 2013 08:52 PM |
Thank you. It worked! :)
—ɪBʀᴀɴᴅʏɴ |
|
|
| Report Abuse |
|