Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 24 Aug 2016 03:11 PM |
| So say I have 6 parts in the workspace named Move1, move2, move3, ETC. Now let's say that there are a total of 6 players in the game. How would I move each player to their own Move brick and not all in the same spot? |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2016 03:14 PM |
| make a player tag script or make the part welded to their body |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2016 03:14 PM |
for k,v in pairs(game.Players:GetPlayers()) do print(workspace["Move" .. k].Name) end |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 24 Aug 2016 03:21 PM |
So maybe something like for k,v in pairs(game.Players:GetPlayers()) do print(workspace["Move" .. k].Name) v.Character:MoveTo(workspace:FindFirstChild("Move"..k).Name) end |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2016 03:22 PM |
name will just return the name of it
so no you just want the part |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 24 Aug 2016 03:25 PM |
| I want the player to teleport to the part. |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
| |
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
| |
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
| |
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 24 Aug 2016 03:59 PM |
| BUmp3 and 2900 post. Cool. |
|
|
| Report Abuse |
|
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
|
| 24 Aug 2016 03:59 PM |
blarg means it should be v.Character:MoveTo(workspace:FindFirstChild("Move"..k)) instead of v.Character:MoveTo(workspace:FindFirstChild("Move"..k).Name)
|
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
| |
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 24 Aug 2016 04:01 PM |
17:01:15.496 - Workspace.Script:4: attempt to index field 'Character' (a nil value) Annd how would I fix this? Sorry I'm new to scripting. |
|
|
| Report Abuse |
|
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
|
| 24 Aug 2016 04:15 PM |
Use an if statement to check if the character exists.
if v.Character then --do stuff end
|
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 24 Aug 2016 04:30 PM |
I'm trying this but it is not working, any thoughts on why? game.Players.PlayerAdded:connect(function(connect) for k,v in pairs(game.Players:GetPlayers()) do print(workspace["Move" .. k].Name) if v.Character then wait(1) v.Character:MoveTo(workspace:FindFirstChild("Move"..k)) end end end)
|
|
|
| Report Abuse |
|
|