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: I Forgot

Previous Thread :: Next Thread 
SpongebobAndMario is not online. SpongebobAndMario
Joined: 12 Mar 2009
Total Posts: 2564
19 Feb 2012 02:08 PM
I forgot how to connect functions without a connection line. How do you do it?
Like:

script.Parent.Touched:connect(function blab()
print "Blab"
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
19 Feb 2012 02:10 PM
The first line basically is the connection line.

script.Parent.Touched:connect(function(blab)
print("blab")
end)

† KMXD †
Report Abuse
ANTH0NY4686 is not online. ANTH0NY4686
Joined: 21 Aug 2011
Total Posts: 7117
19 Feb 2012 02:10 PM
I dunno.
Report Abuse
SpongebobAndMario is not online. SpongebobAndMario
Joined: 12 Mar 2009
Total Posts: 2564
19 Feb 2012 02:23 PM
OH, I see what I was doing wrong. Thanks! :D
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
19 Feb 2012 02:33 PM
No problem.

† KMXD †
Report Abuse
SpongebobAndMario is not online. SpongebobAndMario
Joined: 12 Mar 2009
Total Posts: 2564
19 Feb 2012 03:25 PM
script.Parent.Touched:connect(function(hit)
if hit.Parent.Parent:findFirstChild("Humanoid") ~= nil then
for i = 1,0,-.1 do
hit.Transparency = i
wait(0.1)
end
hit:remove()
end)

My script gives me this:

Workspace.Building.Acids.Acid.Script:8: unexpected symbol near ')'

What'd I do wrong?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
19 Feb 2012 03:28 PM
Try:

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
for i = 1, 0, -0.1 do
hit.Transparency = i
wait(0.1)
end
hit:Destory()
end
end)

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
19 Feb 2012 03:28 PM
Ah, my fault. Try:

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
for i = 1, 0, -0.1 do
hit.Transparency = i
wait(0.1)
end
hit:Destroy()
end
end)

† KMXD †
Report Abuse
SpongebobAndMario is not online. SpongebobAndMario
Joined: 12 Mar 2009
Total Posts: 2564
19 Feb 2012 03:30 PM
What exactly did I do wrong, and what was changed?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
19 Feb 2012 03:31 PM
Not much, I just tidied it a bit. The real problem is that you missed an end.

† KMXD †
Report Abuse
SpongebobAndMario is not online. SpongebobAndMario
Joined: 12 Mar 2009
Total Posts: 2564
19 Feb 2012 03:32 PM
Oh. I swear, the output needs to be more specific.
Report Abuse
SpongebobAndMario is not online. SpongebobAndMario
Joined: 12 Mar 2009
Total Posts: 2564
19 Feb 2012 03:39 PM
Thanks anywhozits
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