fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
|
| 03 Aug 2013 10:07 PM |
PlayerNames = {"fourpapa1","AddName","AddName","AddName","AddName"} for i,v in pairs(PlayerNames) do if Player.Name:lower() == v:lower() then Player.TeamColor = BrickColor.new("Really blue") end
Supposed to change your team and the team is 'Really blue' already |
|
|
| Report Abuse |
|
|
fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
|
| 03 Aug 2013 10:10 PM |
Help? Anyone? I want to fix this fast so me and a friend can play this game now. |
|
|
| Report Abuse |
|
|
sam8985
|
  |
| Joined: 12 Nov 2011 |
| Total Posts: 582 |
|
| |
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 03 Aug 2013 10:12 PM |
local PlayerNames = {"fourpapa1","AddName","AddName","AddName","AddName"}
function TeamChange() for i, player in pairs(game.Players:GetPlayers()) do for _,v in pairs(PlayerNames) do if string.lower(player.Name) == string.lower(v) then player.TeamColor = BrickColor.new("Really blue") end end end end |
|
|
| Report Abuse |
|
|
fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
| |
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 03 Aug 2013 10:25 PM |
| Did you call the function? |
|
|
| Report Abuse |
|
|
fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
| |
|
fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
| |
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 03 Aug 2013 10:38 PM |
| Free models don't belong in this forum. |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 03 Aug 2013 10:39 PM |
@dra, that wasn't a free model.
And you have to call the function like this:
TeamChange() |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2013 10:39 PM |
To call a function, one needs to write the name of the function followed by an open and close parenthesis.
Ex: name() |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 03 Aug 2013 10:39 PM |
| Btw there is no function called. |
|
|
| Report Abuse |
|
|
fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
|
| 03 Aug 2013 10:40 PM |
"Free models"
what model lol
|
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 03 Aug 2013 10:40 PM |
| @Zach It looks like one xD |
|
|
| Report Abuse |
|
|
fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
|
| 03 Aug 2013 10:41 PM |
| TeamChange() is on there already. |
|
|
| Report Abuse |
|
|
| |
|
fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
|
| 03 Aug 2013 10:42 PM |
| I changed it to the one zach gave |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 03 Aug 2013 10:42 PM |
The function TeamChange() is on the script, but then you have to call it some where so the code will execute.
local PlayerNames = {"fourpapa1","AddName","AddName","AddName","AddName"}
function TeamChange() for i, player in pairs(game.Players:GetPlayers()) do for _,v in pairs(PlayerNames) do if string.lower(player.Name) == string.lower(v) then player.TeamColor = BrickColor.new("Really blue") end end end end
TeamChange() -- this executes the code above. |
|
|
| Report Abuse |
|
|
fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
| |
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 03 Aug 2013 10:47 PM |
permission = {"[Names go here]"}
function checkOkToLetIn(name) for i = 1,#permission do if (string.upper(name) == string.upper(permission[i])) then return true end end return false end
admin = game.Teams:findFirstChild("[Team Name here]")
function onEntered(player) if checkOkToLetIn(player.Name) then player.TeamColor = admin.TeamColor end end
game.Players.PlayerAdded:connect(onEntered) |
|
|
| Report Abuse |
|
|
fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
| |
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 03 Aug 2013 10:49 PM |
| Sorry I replaced your whole script. it was just so improperly done xD |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
| |
|
fourpapa1
|
  |
| Joined: 16 Sep 2010 |
| Total Posts: 2603 |
|
|
| 03 Aug 2013 10:52 PM |
| Also zach, thank you also for trying. |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 03 Aug 2013 10:52 PM |
| @Zach I'm sure TeamChange() Executes when the team is changed, not to execute it too change. |
|
|
| Report Abuse |
|
|