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
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
| |
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 4416 |
|
|
| 28 Aug 2013 10:33 PM |
| Is it able to be tested in Build mode? |
|
|
| Report Abuse |
|
|
|
| 28 Aug 2013 10:34 PM |
| I don't think you have a chat bar in build mode, try regular. |
|
|
| Report Abuse |
|
|
Xandalf
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 4416 |
|
| |
|
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 |
|
|
|
| 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 |
|
|
|
| 28 Aug 2013 11:21 PM |
| Sorry Xan I couldn't find the answer to changing teams after dialog. |
|
|
| Report Abuse |
|
|