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: Touched not working

Previous Thread :: Next Thread 
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
14 Mar 2012 04:39 PM
I'm just testing something simple and I've found that this part won't detect a brick when it's Touched. I'm using the event correctly and everything, but the Touched event never gets triggered. Even if I unanchore a part and just drop it on the other part, it doesn't do anything. Any ideas why?


Death to free models.
Report Abuse
TINISH0TZ is not online. TINISH0TZ
Joined: 20 Nov 2009
Total Posts: 2549
14 Mar 2012 04:42 PM
I would like to see the script.
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
14 Mar 2012 04:43 PM
This never prints 'touched' even if I drop a brick on it:

    function hit(part)
        print("touched")
        if part.Velocity.magnitude ​> 5000 then
            part.Anchored = true
            wait()
            part.Velocity = Vector3.new(0, 0, 0)
            wait(0.25)
            part.Anchored = false
            wait(3)
            part:remove()
        end
    end
    
    script.Parent.Touched:connect(hit)


Death to free models.
Report Abuse
bl5eebryce is not online. bl5eebryce
Joined: 03 Aug 2009
Total Posts: 387
14 Mar 2012 04:43 PM
^True that
Report Abuse
bl5eebryce is not online. bl5eebryce
Joined: 03 Aug 2009
Total Posts: 387
14 Mar 2012 04:45 PM
Oh sorry late post :P
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
14 Mar 2012 04:47 PM
Also, there's no output.

Death to free models.
Report Abuse
knexboy1 is not online. knexboy1
Joined: 08 Apr 2009
Total Posts: 74
14 Mar 2012 05:11 PM
Are you testing the script in studio or build mode?
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
14 Mar 2012 05:12 PM
studio
Report Abuse
knexboy1 is not online. knexboy1
Joined: 08 Apr 2009
Total Posts: 74
14 Mar 2012 05:17 PM
Did you click the run button, the reset button and the run button again then test the script? I don't know why but events don't work after you run then reset the game, they only work the first time you run the game.
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
14 Mar 2012 05:20 PM
It won't even work the first time. I've tried it several times.
Report Abuse
knexboy1 is not online. knexboy1
Joined: 08 Apr 2009
Total Posts: 74
14 Mar 2012 05:26 PM
Is the script's disabled property set to true? If it's not then I don't know why the script won't work.
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
14 Mar 2012 06:22 PM
It's not disabled.
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