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: Would this make everyone NOT in a group be on a certain team?

Previous Thread :: Next Thread 
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
17 Oct 2011 01:51 PM
function Enter(newPlayer)
if newPlayer:IsInGroup(412472) ~= nil then
newPlayer.TeamColor=script.Parent.TeamColor
end
end


game.Players.ChildAdded:connect(Enter)

If not, than please fix it for me.
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
17 Oct 2011 01:52 PM
local x = 0
function Enter(newPlayer)
x = 0
if newPlayer:IsInGroup(412472) then
x = 1
end
if x == 0 then
newPlayer.TeamColor=script.Parent.TeamColor
end
end
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
17 Oct 2011 01:53 PM
Should be about right.
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
17 Oct 2011 01:54 PM
OK.
Report Abuse
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
17 Oct 2011 01:59 PM
or use 'else' ?

function Enter(newPlayer)
if newPlayer:IsInGroup(412472) then
-- stuff here for group
else
-- stuff here for non group
end
end
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
17 Oct 2011 02:05 PM
Will this work?

function Enter(newPlayer)
if newPlayer:IsInGroup(412472) then
newPlayer.TeamColor=script.Parent.TeamColor
end
else
newPlayer.TeamColor.Hostiles.TeamColor
end
end
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
17 Oct 2011 02:10 PM
bump
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
17 Oct 2011 02:10 PM
No connection line so no.

Game.Players.PlayerAdded:connect(function(p)
if p:IsInGroup(412472) then
p.TeamColor = script.Parent.TeamColor
end
end)

Also make the Hostiles team AutoAssignable.
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
17 Oct 2011 02:12 PM
But RATEX, that will make hostiles have to WALK to the hostiles spawn?
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
17 Oct 2011 02:14 PM
Nope.
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
17 Oct 2011 02:14 PM
No that would make them spawn at their own spawn, add a MoveTo line to tele your people to their teams spawn also.
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
17 Oct 2011 02:15 PM
Please post the whole script, I can't understand this.
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
17 Oct 2011 02:18 PM
function Player(NewPlayer)
if NewPlayer:IsInGroup(412472) then
NewPlayer.TeamColor = script.Parent.TeamColor
NewPlayer.Character:MoveTo(0,0,0)--Set Spawn Vector 3
end
end
Game.Players.PlayerAdded:connect(Player)
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
17 Oct 2011 02:20 PM
Yes, that makes the person IN the group spawn at certain spawnpoint. But what I'm asking is how to make some NOT in group 412472 spawn at a DIFFERENT spawnpoint. I don't see how that script does that.
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
17 Oct 2011 02:22 PM
The script doesnt have to, you set the hostile spawn point and make their team auto-assiged.
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
17 Oct 2011 02:25 PM
OH YES I SEE, thank you.
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
17 Oct 2011 02:27 PM
So this should do it?

function Player(NewPlayer)
if NewPlayer:IsInGroup(412472) then
NewPlayer.TeamColor = script.Parent.TeamColor
NewPlayer.Character:MoveTo(420.5, 15.2, -245.5)--Set Spawn Vector 3
end
end
Game.Players.PlayerAdded:connect(Player)
Report Abuse
EnzoDaVinci is not online. EnzoDaVinci
Joined: 14 Apr 2011
Total Posts: 3730
17 Oct 2011 02:35 PM
bump
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
17 Oct 2011 02:36 PM
If you house it in a Team or BrickColor Value then yes.
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