Verkauf
|
  |
| Joined: 22 May 2009 |
| Total Posts: 12965 |
|
|
| 17 Jun 2015 07:49 PM |
workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) if choice.Name == "void" then player.MoveTo(game.Workspace.voidspawn.Position + Vector3.new(0,5,0)) end end)
i tried and failed can somebody fix it please
- She said don't hesitate, just do what you want to do to me. |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 08:07 PM |
Assuming that your player object is an instance of type Player, rather than doing player.MoveTo(game.Workspace.voidspawn.Position + Vector3.new(0,5,0)) you should instead do: player.Character.Humanoid:MoveTo(game.Workspace.voidspawn.Position + Vector3.new(0, 5, 0))
The Player object does not have the method "MoveTo"; it's a member function of humanoids. Furthermore, all functions in ROBLOX have been standardized to be in the form of object:Function(arguments) |
|
|
| Report Abuse |
|
|
Verkauf
|
  |
| Joined: 22 May 2009 |
| Total Posts: 12965 |
|
|
| 17 Jun 2015 08:07 PM |
also is choice.Name the user dialog or the name of the choice?
- She said don't hesitate, just do what you want to do to me. |
|
|
| Report Abuse |
|
|
Verkauf
|
  |
| Joined: 22 May 2009 |
| Total Posts: 12965 |
|
|
| 17 Jun 2015 09:17 PM |
script.Parent.DialogChoiceSelected:connect(function(player,choice) if choice.Name == "Fight now" then player.Character.Humanoid:MoveTo(game.Workspace.voidspawn.Position + Vector3.new(0, 5, 0)) end end)
"DialogChoiceSelected is not a valid member of DialogChoice"
- She said don't hesitate, just do what you want to do to me. |
|
|
| Report Abuse |
|
|
Verkauf
|
  |
| Joined: 22 May 2009 |
| Total Posts: 12965 |
|
|
| 18 Jun 2015 03:41 PM |
bump
- She said don't hesitate, just do what you want to do to me. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2015 01:57 PM |
| You're referencing the wrong object then. DialogChoiceSelected is not a child of Dialog. Double-check your hierarchy. |
|
|
| Report Abuse |
|
|