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: Spawn Script won't work? (Only short)

Previous Thread :: Next Thread 
makaroony is not online. makaroony
Joined: 15 Dec 2010
Total Posts: 99
09 Dec 2013 02:37 PM
game.Players.ChildAdded:connect(Enter)

function Enter (newPlayer)
if newPlayer:GetRankinGroup(870639)>= (4) then
newPlayer.TeamColor=script.Parent.Teamcolor
end
end

game.Players.ChildAdded:connect(Enter)

I placed this in a spawn and as far as in aware it should spawn someone if they are in that rank (Which i am.) but i just get spawned on the other spawn i had placed...
Report Abuse
Basswobble is not online. Basswobble
Joined: 18 Jul 2011
Total Posts: 3249
09 Dec 2013 02:39 PM
GetRankInGroup*

You know it returns the level of the rank? When you create ranks, you can order them with numbers between 1-255.

So you'll have to contact your group owner or check yourself what the numbers are.

~ Like a Bass ~
Report Abuse
thepizz is not online. thepizz
Joined: 05 Mar 2011
Total Posts: 2612
09 Dec 2013 02:42 PM
You might want to add " if newPlayer:IsA("Player") then", but I do not know what you are doing
Report Abuse
thepizz is not online. thepizz
Joined: 05 Mar 2011
Total Posts: 2612
09 Dec 2013 02:43 PM
This is not why it broke, just a suggestion..
Report Abuse
makaroony is not online. makaroony
Joined: 15 Dec 2010
Total Posts: 99
09 Dec 2013 02:44 PM
Oh sorry. My goal is to get a Rank restricted spawn. The numbers are 1-9 with the owner on 255.
Report Abuse
thepizz is not online. thepizz
Joined: 05 Mar 2011
Total Posts: 2612
09 Dec 2013 02:48 PM
Also, if the script.Parent.Teamcolor is a BrickColorValue you have to go to the Value property, if not, I think it is supposed to be TeamColor
Report Abuse
makaroony is not online. makaroony
Joined: 15 Dec 2010
Total Posts: 99
09 Dec 2013 02:52 PM
Ok so I'm now at?

game.Players.ChildAdded:connect(Enter)

function Enter (newPlayer)
if newPlayer:IsA('Player') and
newPlayer:GetRankInGroup(870639)>= (4) then
newPlayer.TeamColor=script.Parent.TeamColor
end
end
end

game.Players.ChildAdded:connect(Enter)
Report Abuse
Basswobble is not online. Basswobble
Joined: 18 Jul 2011
Total Posts: 3249
09 Dec 2013 02:55 PM
Where is the script parented?

~ Like a Bass ~
Report Abuse
makaroony is not online. makaroony
Joined: 15 Dec 2010
Total Posts: 99
09 Dec 2013 02:56 PM
In a Spawn part in the Workspace, if i got your meaning...
Report Abuse
Basswobble is not online. Basswobble
Joined: 18 Jul 2011
Total Posts: 3249
09 Dec 2013 03:00 PM
Just make sure:

newPlayer.TeamColor=script.Parent.TeamColor

Otherwise I don't know what's wrong.

~ Like a Bass ~
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