ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 14 Apr 2013 12:21 PM |
This is a script for a CTF game. C1 is a spawn.
function onTouch(hit) local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr ~= nil then local color = plr.TeamColor game.Workspace.C1.TeamColor = color end script.Parent.Touched:connect(onTouch)
OR
Would line 5 have to be "game.Workspace.C1.TeamColor = TeamColor.new(color)?" |
|
|
| Report Abuse |
|
|
MrTechn0
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 1252 |
|
|
| 14 Apr 2013 12:28 PM |
| Is GetPlayerFromCharacter is nil i believe if there was something like this it would have to have the first word be uncapatalized e.g. getPlayerFromCharacter |
|
|
| Report Abuse |
|
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 14 Apr 2013 12:30 PM |
| No, it doesn't really matter if get is capitalized or not. That's just scripters' different styles. |
|
|
| Report Abuse |
|
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
| |
|
|
| 14 Apr 2013 12:43 PM |
| Test yourself and find out. |
|
|
| Report Abuse |
|
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 14 Apr 2013 12:44 PM |
| Can't. Whenever I try to start server, Studio crashes. |
|
|
| Report Abuse |
|
|
| |
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 14 Apr 2013 12:51 PM |
| Ohya. I forgot to add that. Just ignore the missing end. |
|
|
| Report Abuse |
|
|