generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: This is the only thing standing between me, and a finished base.

Previous Thread :: Next Thread 
toomad is not online. 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 is not online. 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 is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
09 Aug 2011 06:02 PM
Is that script in a Spawnlocation?
Report Abuse
toomad is not online. toomad
Joined: 11 May 2007
Total Posts: 6155
09 Aug 2011 06:05 PM
Yes.
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
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 is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
09 Aug 2011 06:09 PM
@Ratex
He doesn't :/
Report Abuse
toomad is not online. 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
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
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 is not online. 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
PompeyTheGreat is not online. PompeyTheGreat
Joined: 10 Apr 2011
Total Posts: 5615
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 is not online. 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
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
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
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
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 is not online. 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
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
09 Aug 2011 06:23 PM
Did you remove the last line as I told you? The end) ?
Report Abuse
toomad is not online. 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
PompeyTheGreat is not online. PompeyTheGreat
Joined: 10 Apr 2011
Total Posts: 5615
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 is not online. 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
PompeyTheGreat is not online. PompeyTheGreat
Joined: 10 Apr 2011
Total Posts: 5615
09 Aug 2011 06:30 PM
Who?
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
09 Aug 2011 06:31 PM
toomad if you're talking to me then no, about pompey I don't know.
Report Abuse
toomad is not online. toomad
Joined: 11 May 2007
Total Posts: 6155
09 Aug 2011 06:37 PM
RATE

Why not?
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
09 Aug 2011 06:39 PM
I help for free and that wasn't really hard at all.
Report Abuse
toomad is not online. toomad
Joined: 11 May 2007
Total Posts: 6155
09 Aug 2011 06:43 PM
Okay then, thanks alot.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image