|
| 26 Dec 2015 03:30 PM |
| Does anyone know how to make it so when someone step on a part they get sent to another area and at the same time given a tool? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 26 Dec 2015 03:31 PM |
local tool = asd
part.Touched:connect(function(obj) local player = game.Players:GetPlayerFromCharacter(obj.Parent) if player then obj:MoveTo(newAreaPosition) tool:Clone().Parent = player.Backpack end end) |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Dec 2015 03:33 PM |
| I don't understand how obj and obj:MoveTo works in the above, could you explain? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 26 Dec 2015 03:38 PM |
obj is whatever touched the part And it should be obj.Parent:MoveTo(pos) woops. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Dec 2015 03:51 PM |
| The parent of obj would be a model, so does that mean we can :MoveTo models?? :D |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Dec 2015 03:53 PM |
Also, what is the root part of a Character? I would be curious to know.
This is much more convenient than Cframing the position of the Torso... |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Dec 2015 04:57 PM |
| MoveTo on models is quite usual? d; |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
| |
|
| |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Dec 2015 05:46 PM |
| cntkillme gave you the answer |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 01:43 PM |
| but should i change the first line to what the tool is called? |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 27 Dec 2015 02:27 PM |
Yes, path to the location of the tool. For ex, if you keep it in lighting, then local tool = game.Lighting.ToolName |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Dec 2015 03:53 PM |
| In the second line were it says part,it has red under it, what do i do? |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 03:55 PM |
| it says it had expect an equal sign |
|
|
| Report Abuse |
|
|
| |
|
| |
|