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: Group Script Problem

Previous Thread :: Next Thread 
Dennoid is not online. Dennoid
Joined: 21 Jun 2011
Total Posts: 167
14 Jan 2014 07:47 PM
Some reason my group script is not working, when a member of the group joins the game they should be automatically assigned to the group team, and if they are not part of the group, they should be on the raiders team. Here is the script in the group spawn down below:

local groupid = 1021768

function onPlayerEntered(player)
if player:IsInGroup(groupid) then
player.CharacterAdded:connect(onCharacterAdded)
end
end

function onCharacterAdded(character)
character:MoveTo(script.Parent.Position + Vector3.new(0,5,0))
end

game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
14 Jan 2014 08:00 PM
local groupid = 1021768

game.Players.PlayerAdded:connect(function(player)
if player:IsInGroup(groupid) then
player.TeamColor = BrickColor.new("") --Brick color of team here. Case sensative.
player:LoadCharacter()
else
player.TeamColor = BrickColor.new("") --raider team color hear.
player:LoadCharacter()
end
end)



~Hope I helped, if you need a script, PM me first then buy this when I tell you to: http://www.roblox.com/My-Script-Shirt-item?id=118961994~ ~Glory to CAT!~ ~CAT General Shawnyg~
Report Abuse
Dennoid is not online. Dennoid
Joined: 21 Jun 2011
Total Posts: 167
14 Jan 2014 08:09 PM
Thanks! It worked!
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
14 Jan 2014 08:15 PM
No problem.

~Hope I helped, if you need a script, PM me first then buy this when I tell you to: http://www.roblox.com/My-Script-Shirt-item?id=118961994~ ~Glory to CAT!~ ~CAT General Shawnyg~
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