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 » Scripting Helpers
Home Search
 

Re: Team Changer

Previous Thread :: Next Thread 
Xandalf is not online. Xandalf
Joined: 18 Jul 2011
Total Posts: 4416
28 Aug 2013 10:11 PM
I'm trying to make a script so that if the person who is talking to a dialog chooses a certain choice, it changes his team.

I'm using this Script as a starter:

workspace.Dialog.DialogChoiceSelected:connect(function(player,choice)
if choice.Name == "isplayer" and player.Name == "pighead10" then
player.Character.Humanoid.Health = 10000
end
end)

Do I change it to this?

Workspace.RedcliffEliteCommander.Dialog.DialogChoiceSelected:connect(function(player,choice)
player.Character.Team = Recliff
end
end)
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
28 Aug 2013 10:15 PM
why not a GUI or button?
Report Abuse
Xandalf is not online. Xandalf
Joined: 18 Jul 2011
Total Posts: 4416
28 Aug 2013 10:16 PM
I'm a beginner scripter and GUIs are too complicated for me right now.
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
28 Aug 2013 10:17 PM
no that'd be easier, make a GUI pop up from the player gui, and sorta have that be the team changer.
Report Abuse
ninjasamuraiux is not online. ninjasamuraiux
Joined: 23 Aug 2011
Total Posts: 5405
28 Aug 2013 10:18 PM
game.Players.PlayerAdded:connect(function(p)
p.Chatted:connect(function(msg)
if msg == "COMMAND HERE" then
p.TeamColor = BrickColor.new("TEAM COLOR")
end
end)
end)
Report Abuse
Xandalf is not online. Xandalf
Joined: 18 Jul 2011
Total Posts: 4416
28 Aug 2013 10:25 PM
@ninja

So, do I make it look like this?:

game.Players.PlayerAdded:connect(function(p)
p.Chatted:connect(function(msg)
if msg == "Yes, I will join Redcliff." then
p.TeamColor = BrickColor.new("Really Red")
end
end)
end)

And where do I put the script? in the Dialog, the Dialog Choice, or the Workspace?
Report Abuse
ninjasamuraiux is not online. ninjasamuraiux
Joined: 23 Aug 2011
Total Posts: 5405
28 Aug 2013 10:30 PM
It doesn't really matter since it doesn't have script.Parent or anything but I'd suggest Workspace if you aren't trying to hide it.
Report Abuse
ninjasamuraiux is not online. ninjasamuraiux
Joined: 23 Aug 2011
Total Posts: 5405
28 Aug 2013 10:31 PM
The script would work exept BrickColor.new("Really Red") needs to be changed to BrickColor.new("Really red") because you don't capitolize the second word unless it's New Yeller
Report Abuse
Xandalf is not online. Xandalf
Joined: 18 Jul 2011
Total Posts: 4416
28 Aug 2013 10:33 PM
Is it able to be tested in Build mode?
Report Abuse
ninjasamuraiux is not online. ninjasamuraiux
Joined: 23 Aug 2011
Total Posts: 5405
28 Aug 2013 10:34 PM
I don't think you have a chat bar in build mode, try regular.
Report Abuse
Xandalf is not online. Xandalf
Joined: 18 Jul 2011
Total Posts: 4416
28 Aug 2013 10:35 PM
Ok. :/
Report Abuse
Xandalf is not online. Xandalf
Joined: 18 Jul 2011
Total Posts: 4416
28 Aug 2013 10:36 PM
And do I use tabs? Because the forum doesn't show the tabs.
Report Abuse
OcCartoonist is not online. OcCartoonist
Joined: 16 Apr 2013
Total Posts: 98
28 Aug 2013 10:51 PM
No tabs aren't necessary just easier to read.























~Dont give a sword to a man who can't dance~
--Confucius
Report Abuse
ninjasamuraiux is not online. ninjasamuraiux
Joined: 23 Aug 2011
Total Posts: 5405
28 Aug 2013 11:21 PM
Sorry Xan I couldn't find the answer to changing teams after dialog.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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