generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help me with debugging this simple script?

Previous Thread :: Next Thread 
iBrandyn is not online. 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
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
21 Jun 2013 08:50 PM
if hit.Parent:FindFirstChild("Humanoid") ~= nil then -- Is it a person? If so, continue.
Report Abuse
iBrandyn is not online. iBrandyn
Joined: 30 May 2013
Total Posts: 1699
21 Jun 2013 08:52 PM
Thank you. It worked! :)

—ɪBʀᴀɴᴅʏɴ
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image