|
| 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 |
|
|
|
| 11 Feb 2014 10:59 PM |
| soooo,either someones taking long time to type,or no one is on forums right now...:\ |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Feb 2014 11:05 PM |
plz help ;..(
|_| .-. \-/ -yes I am an alien,whats it to ya?- |
|
|
| Report Abuse |
|
|
Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
| |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
| |
|
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 |
|
|
|
| 12 Feb 2014 12:05 AM |
| This item is deprecated. Do not use it for new work. Use TouchEnded instead. |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2014 02:17 AM |
| So many things are depreceating.......... |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2014 06:36 AM |
| Because they are useless :| |
|
|
| Report Abuse |
|
|