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: StoppedTouching not working?

Previous Thread :: Next Thread 
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
11 Feb 2014 10:55 PM
I got this pretty much from the wiki,so why doesn't it work?(not long)

script.Parent.StoppedTouching:connect(notsitting)
script.Parent.Touched:connect(sitting)
function sitting()
script.Parent.Parent.MainPart.IsSatOn.Value = true
print ("is he sitting? sitting = "..script.Parent.Parent.MainPart.IsSatOn.Value)
end
function notsitting()
script.Parent.Parent.MainPart.IsSatOn.Value = false
print ("is he sitting? sitting = "..script.Parent.Parent.MainPart.IsSatOn.Value)
end
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
11 Feb 2014 10:59 PM
soooo,either someones taking long time to type,or no one is on forums right now...:\
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
11 Feb 2014 11:02 PM
lalalala
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
11 Feb 2014 11:05 PM
plz help ;..(


|_|
.-.
\-/
-yes I am an alien,whats it to ya?-
Report Abuse
Hazania is not online. Hazania
Joined: 04 Jun 2010
Total Posts: 1344
11 Feb 2014 11:06 PM
One moment.
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
11 Feb 2014 11:08 PM
Hooray!
Report Abuse
Crazy010517 is not online. Crazy010517
Joined: 17 Sep 2011
Total Posts: 1161
11 Feb 2014 11:08 PM
I believe the script.Parent.StoppedTouching and Touched is suppose to be last.


function sitting()
script.Parent.Parent.MainPart.IsSatOn.Value = true
print ("is he sitting? sitting = "..script.Parent.Parent.MainPart.IsSatOn.Value)
end
function notsitting()
script.Parent.Parent.MainPart.IsSatOn.Value = false
print ("is he sitting? sitting = "..script.Parent.Parent.MainPart.IsSatOn.Value)
end
script.Parent.StoppedTouching:connect(notsitting)
script.Parent.Touched:connect(sitting)
Report Abuse
Hazania is not online. Hazania
Joined: 04 Jun 2010
Total Posts: 1344
11 Feb 2014 11:10 PM
Try putting the first 2 lines at the end, otherwise it cannot go back to check for the functions notsitting, and sitting. Not sure if this is right but just a suggestion. Nothing looks invalid, what does the output say?
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
11 Feb 2014 11:12 PM
ohder...I am trying to call a nil value,as the functions weren't created yet..
thx guys!
Report Abuse
Crazy010517 is not online. Crazy010517
Joined: 17 Sep 2011
Total Posts: 1161
11 Feb 2014 11:16 PM
Lol...
Report Abuse
Hazania is not online. Hazania
Joined: 04 Jun 2010
Total Posts: 1344
11 Feb 2014 11:17 PM
Should have been obvious lol, Crazy beat me to the punch tho :(
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
12 Feb 2014 12:05 AM
This item is deprecated. Do not use it for new work. Use TouchEnded instead.
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
12 Feb 2014 02:17 AM
So many things are depreceating..........
Report Abuse
Solsticedev is not online. Solsticedev
Joined: 02 Feb 2014
Total Posts: 343
12 Feb 2014 06:36 AM
Because they are useless :|
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