MiniNob
|
  |
| Joined: 14 May 2013 |
| Total Posts: 822 |
|
|
| 23 Jun 2015 03:37 PM |
| How would I do that? If I walk, for example, the "Changed" event for the torso's position does not fire. |
|
|
| Report Abuse |
|
|
gunter5
|
  |
| Joined: 15 Mar 2011 |
| Total Posts: 737 |
|
|
| 23 Jun 2015 03:54 PM |
lets say the script is in starterpack.
player = script.Parent.Parent.Parent
player.Character.Torso.Position.Changed:connect(function() --code to write here. end) |
|
|
| Report Abuse |
|
|
MiniNob
|
  |
| Joined: 14 May 2013 |
| Total Posts: 822 |
|
|
| 23 Jun 2015 03:56 PM |
| Changed doesn't fire when the torso is moves, it only fires when the Position property is changed. |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2015 03:57 PM |
... "player.Character.Torso.POSITION.Changed:connect(function() --code to write here. end)"
u sicko! |
|
|
| Report Abuse |
|
|
Mitko0o1
|
  |
| Joined: 30 Nov 2010 |
| Total Posts: 5725 |
|
|
| 23 Jun 2015 04:01 PM |
You are both wrong.
You cannot call "Changed" on a property, your event should look like this:
player.Torso.Changed:connect(function(property) if property == "Position" then print(player.Torso.Position) end end) |
|
|
| Report Abuse |
|
|
gunter5
|
  |
| Joined: 15 Mar 2011 |
| Total Posts: 737 |
|
|
| 23 Jun 2015 04:01 PM |
| ohhh i see now. the torso's position cannot change because the game is pairing the torso to the models position.. so even if you move the torso "doesnt" move. ok your going to have to make a different factor to base that off of. or you could simply use key:keylower() for each movement key. |
|
|
| Report Abuse |
|
|
gunter5
|
  |
| Joined: 15 Mar 2011 |
| Total Posts: 737 |
|
|
| 23 Jun 2015 04:03 PM |
| im sure im missing something very obvious here and probably look like a nub. but hopefully someone will come along to help |
|
|
| Report Abuse |
|
|
gunter5
|
  |
| Joined: 15 Mar 2011 |
| Total Posts: 737 |
|
|
| 23 Jun 2015 04:04 PM |
| nevermind didnt see above posts e.e |
|
|
| Report Abuse |
|
|
MiniNob
|
  |
| Joined: 14 May 2013 |
| Total Posts: 822 |
|
|
| 24 Jun 2015 03:38 AM |
| Nevermind, I just use Stepped. |
|
|
| Report Abuse |
|
|