generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Dialog script

Previous Thread :: Next Thread 
Verkauf is not online. 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
Programmix is not online. Programmix
Joined: 07 Dec 2014
Total Posts: 99
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 is not online. 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 is not online. 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 is not online. 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
Programmix is not online. Programmix
Joined: 07 Dec 2014
Total Posts: 99
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image