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'm having trouble with "touch" events

Previous Thread :: Next Thread 
laboblox is not online. laboblox
Joined: 15 Feb 2010
Total Posts: 245
29 Nov 2013 08:43 PM
i can't get Path.Part.Touched:connect(functionName()) to work..
is there a different way to register touch events for a script..
PS.. i was trying this in Offline mode


Report Abuse
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
29 Nov 2013 08:48 PM
did you use script.Parent.Touched:connect(function name)
at the end?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
29 Nov 2013 08:48 PM
it's functionName, not functionName()
Report Abuse
laboblox is not online. laboblox
Joined: 15 Feb 2010
Total Posts: 245
29 Nov 2013 08:57 PM
well that too but it doesn't want to work :(
Report Abuse
TheNickmaster21 is not online. TheNickmaster21
Joined: 04 Oct 2008
Total Posts: 9490
29 Nov 2013 09:02 PM
Can you post your script? That would make it allot easier to find your problem...
Report Abuse
NoctisLightning is not online. NoctisLightning
Joined: 13 Jun 2012
Total Posts: 383
29 Nov 2013 09:02 PM
Maybe you should delete the extra ) at the end like this:

Path.Part.Touched:connect(functionName()

Report Abuse
laboblox is not online. laboblox
Joined: 15 Feb 2010
Total Posts: 245
29 Nov 2013 09:05 PM
i'm using a simple thouch event detect;



print("running")
function hit(v)
print("hit")
print(v:GetfFullName())
end

script.Parent.Touched:connect(hit)
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
29 Nov 2013 09:07 PM


script.Parent.Touched:connect(function(hit) --anonymous function
print("running")
if hit then
print(hit.Name)
end
end)
Report Abuse
TheNickmaster21 is not online. TheNickmaster21
Joined: 04 Oct 2008
Total Posts: 9490
29 Nov 2013 09:09 PM
print("Running")
script.Parent.Touched:connect(function(hit)
if hit then
print(hit.Name)
end
end)
Report Abuse
laboblox is not online. laboblox
Joined: 15 Feb 2010
Total Posts: 245
29 Nov 2013 09:11 PM
it works, thanks
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