|
| 25 Aug 2011 03:00 PM |
I have a team teleport script;
play = game.Players:GetChildren()
for i = 1,#play do if play[i].TeamColor == teams[team1].TeamColor then char = play[i].Character if char ~= nil then torso = char:findFirstChild("Torso") if torso ~= nil then torso.CFrame = game.Workspace[BlueGameTele].CFrame elseif play[i].TeamColor == teams[team2].TeamColor then char = play[i].Character if char ~= nil then torso = char:findFirstChild("Torso") -----------------------------------HERE IS 113 if torso ~= nil then torso.CFrame = game.Workspace[RedGameTele].CFrame end end end end end end
and I get in out this:
Players.Player.PlayerGui.GameGui.Script:113: bad argument #2 to '?' (string expected, got userdata)
Line 113, is where I put a line of -'s |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2011 03:02 PM |
noo.. i think it has to do with
torso.CFrame = game.Workspace[BlueGameTele].CFrame
try chagning that to
torso.CFrame = game.Workspace["BlueGameTele"].CFrame
same with other team |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2011 03:04 PM |
BlueGameTele is a variable e.g:
BlueGameTele = game.Workspace.BlueGameTele
It has something with line 113, where torso I guess is not found or astring is needed... |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Aug 2011 03:07 PM |
| well.. you tagged the torso part twice.. |
|
|
| Report Abuse |
|
|
| |
|