toomad
|
  |
| Joined: 11 May 2007 |
| Total Posts: 6155 |
|
|
| 09 Aug 2011 05:55 PM |
I have a group only spawn. the actual "spawning" works. But I wont join the team. The team i want it to join is Skull Brotherhood, but instead it joines the default team I have there. How can I make it when I join, all group members will join Skull Brotherhood, and spawn on the group only spawn?
Here is the script.
local groupId = 277859 local groupId = 277859 function RegisterPlayer( player ) if CheckInGroup(player, groupId) then HoldThreadForCharacter(player) player.Character:MoveTo(script.Parent.Position + Vector3.new(0,3,0)) end end
function CheckInGroup( player, id ) if player:IsInGroup(id) then return true end return false end
function HoldThreadForCharacter( player ) repeat wait() until Workspace:FindFirstChild(player.Name) end
Game.Players.PlayerAdded:connect(RegisterPlayer) for i,v in pairs(Game.Players:GetPlayers()) do RegisterPlayer(v) end
|
|
|
| Report Abuse |
|
|
toomad
|
  |
| Joined: 11 May 2007 |
| Total Posts: 6155 |
|
|
| 09 Aug 2011 06:00 PM |
| Come on guys i know its not that hard, please help. |
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 09 Aug 2011 06:02 PM |
| Is that script in a Spawnlocation? |
|
|
| Report Abuse |
|
|
toomad
|
  |
| Joined: 11 May 2007 |
| Total Posts: 6155 |
|
| |
|
|
| 09 Aug 2011 06:08 PM |
| I don't see any lines about teams and you need and end) at last line. |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
| |
|
toomad
|
  |
| Joined: 11 May 2007 |
| Total Posts: 6155 |
|
|
| 09 Aug 2011 06:10 PM |
| Okay so what is the line? I'm a beginner scripter, here. |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2011 06:11 PM |
@Spectrumw
Game.Players.PlayerAdded:connect(RegisterPlayer) for i,v in pairs(Game.Players:GetPlayers()) do RegisterPlayer(v) end --end)
He does. |
|
|
| Report Abuse |
|
|
toomad
|
  |
| Joined: 11 May 2007 |
| Total Posts: 6155 |
|
|
| 09 Aug 2011 06:12 PM |
I had this here
player.TeamColor=game.Teams["Skull Brotherhood"].Teamcolor
But it didnt change anything. |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2011 06:13 PM |
@Rate
Game.Players.PlayerAdded:connect(RegisterPlayer) connects the funtion stated a while back, it is not a new function. Hence there is no "function"
|
|
|
| Report Abuse |
|
|
CrniOrao
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 2274 |
|
|
| 09 Aug 2011 06:13 PM |
What about this..?
player.TeamColor=game.Teams["Skull Brotherhood"].TeamColor |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2011 06:15 PM |
local groupId = 277859 local groupId = 277859 function RegisterPlayer( player ) if CheckInGroup(player, groupId) then HoldThreadForCharacter(player) player.TeamColor = Game:GetService("Teams")["Skull Brotherhood"].TeamColor player.Character:MoveTo(script.Parent.Position + Vector3.new(0,3,0)) end end
function CheckInGroup( player, id ) if player:IsInGroup(id) then return true end return false end
function HoldThreadForCharacter( player ) repeat wait() until Workspace:FindFirstChild(player.Name) end
Game.Players.PlayerAdded:connect(RegisterPlayer) for i,v in pairs(Game.Players:GetPlayers()) do RegisterPlayer(v) end end)
Try this I think I made a mistake with the color property of team. I can't be bothered to open Studio and check. |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2011 06:16 PM |
| @Pompey sorry I'm used to anonymous functions, sorry Spectrumw. Remove the last line from the script I posted it was a late post. |
|
|
| Report Abuse |
|
|
toomad
|
  |
| Joined: 11 May 2007 |
| Total Posts: 6155 |
|
|
| 09 Aug 2011 06:22 PM |
Didn't work, I got this message:
Workspace.BrotherhoodSpawn.grouponly:26: '< eof >' expected near 'end' |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2011 06:23 PM |
| Did you remove the last line as I told you? The end) ? |
|
|
| Report Abuse |
|
|
toomad
|
  |
| Joined: 11 May 2007 |
| Total Posts: 6155 |
|
|
| 09 Aug 2011 06:26 PM |
| Oh, lol I didn't see that, Okay Nothing came up, Im going to test it ingame. |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2011 06:27 PM |
I'll just write a new one, much easier to do than decode yours.
local group = 277859
game.Players.PlayerAdded:connect(function(plr) repeat wait() until plr.Character if plr:IsInGroup(group) then plr.Character:MoveTo(script.Parent.Position + Vector3.new(0,3,0)) else return false print("not in group") end end) |
|
|
| Report Abuse |
|
|
toomad
|
  |
| Joined: 11 May 2007 |
| Total Posts: 6155 |
|
|
| 09 Aug 2011 06:30 PM |
DUDE A THOUSAND RESPECT POINTS AND 50 RS GO TO YOU!!!
THANKS SO MUCH!!!
Now make a shirt, and i'll buy. |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Aug 2011 06:31 PM |
| toomad if you're talking to me then no, about pompey I don't know. |
|
|
| Report Abuse |
|
|
toomad
|
  |
| Joined: 11 May 2007 |
| Total Posts: 6155 |
|
| |
|
|
| 09 Aug 2011 06:39 PM |
| I help for free and that wasn't really hard at all. |
|
|
| Report Abuse |
|
|
toomad
|
  |
| Joined: 11 May 2007 |
| Total Posts: 6155 |
|
| |
|