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 » Scripters
Home Search
 

Re: Attempted it. Doesn't work (Simple)

Previous Thread :: Next Thread 
Flexes is not online. Flexes
Joined: 13 Apr 2015
Total Posts: 1584
30 Dec 2015 11:45 PM
There's a NumberValue in the Team that represents the GroupID. If a player in the team isn't in the group, they are to be kicked out from the game. I attempted to code this, but it seems not to be working. Any helps?

** Script in Workspace **

for _, v in pairs (game:GetService("Teams"):GetTeams()) do
for _, s in pairs (game:GetService("Players"):GetPlayers()) do
while true do
if s:IsInGroup(v.Group.Value) then
s.Humanoid.Health = 100
else
s:remove()
end
end
end
end
Report Abuse
Threatboy101 is not online. Threatboy101
Joined: 27 Oct 2012
Total Posts: 874
30 Dec 2015 11:47 PM
It's game.Players:GetPlayers()
Report Abuse
Threatboy101 is not online. Threatboy101
Joined: 27 Oct 2012
Total Posts: 874
30 Dec 2015 11:50 PM
It's s.Character.Humanoid.Health
Report Abuse
Incrility is not online. Incrility
Joined: 11 Sep 2014
Total Posts: 161
30 Dec 2015 11:54 PM
local HR_Rank = 9 -- set to 0 if you want any member in the group to stay in game


game.Players.PlayerAdded:connect(function(Plyr)
local HRTeam = game.Teams:FindFirstChild("High Ranks")
if Plyr:IsInGroup(groupId) or Plyr.Name == "" then
local rank = Plyr:GetRankInGroup(groupId)
if rank >= HR_Rank then
print 'LOL!'
else
Plyr.remove()
end end end)

Report Abuse
Threatboy101 is not online. Threatboy101
Joined: 27 Oct 2012
Total Posts: 874
30 Dec 2015 11:54 PM
You also have an infinite loop
Report Abuse
Flexes is not online. Flexes
Joined: 13 Apr 2015
Total Posts: 1584
30 Dec 2015 11:56 PM
@Incri

Yes, thank you. But the problem is, how would I do this to multiple teams? Each team has their own NumberValue for their Group ID.
Report Abuse
Threatboy101 is not online. Threatboy101
Joined: 27 Oct 2012
Total Posts: 874
30 Dec 2015 11:56 PM
@Incri :remove() not .remove()
Report Abuse
Flexes is not online. Flexes
Joined: 13 Apr 2015
Total Posts: 1584
30 Dec 2015 11:59 PM
How can you make it so it repeatedly checks if the player is in the Group?
Report Abuse
Flexes is not online. Flexes
Joined: 13 Apr 2015
Total Posts: 1584
31 Dec 2015 12:04 AM
Bumppppp
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
31 Dec 2015 12:11 AM
My god you are all morons(op isnt but he just cant script)


Anyway

game.Players.PlayerAdded:connect(function(player)
if player:IsInGroup(ID) then
player.TeamColor = BrickColor.new("Really Red")
elseif player:IsInGroup(ID2) then
player.TeamColor = BrickColor.new("Really Blue")
else
player:Kick()
end


Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
31 Dec 2015 12:12 AM
Basicly when they join it will first check if they are in group1, and if they are put them on that team, if they are in group 2 they will be put in team2, if they are in neither they will be kicked
Report Abuse
Flexes is not online. Flexes
Joined: 13 Apr 2015
Total Posts: 1584
31 Dec 2015 12:22 AM
Could that work?
I just need it to repeat. This script is for exploiters. You know how they use Cheat Engine to change their User ID to a different User ID and they can change their teams? I would like so that when they're on the team and they're not in the certain group for it they get kicked. That's what i'm trying to do.

game.Players.PlayerAdded:connect(function(player)
if player:IsInGroup(ID) and player.TeamColor = BrickColor.new("Bright blue") then
print("Safe")
elseif player:IsInGroup(ID2) and player.TeamColor = BrickColor.new("Bright red") then
print("Safe")
else
player:Kick()
end
Report Abuse
Flexes is not online. Flexes
Joined: 13 Apr 2015
Total Posts: 1584
31 Dec 2015 12:23 AM
I'm not trying to make it so it'll automatically put them on the team. It's just a security check script.
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
31 Dec 2015 12:23 AM
They would get kicked before any "hacking" could be done, and even if they "hacked" in looping wouldnt do anything
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
31 Dec 2015 12:24 AM
Why do people state that their broken code is simple? If it's simple then stop asking us to fix it and do it yourself.
Report Abuse
Flexes is not online. Flexes
Joined: 13 Apr 2015
Total Posts: 1584
31 Dec 2015 12:24 AM
At least I gave it a try right? People just request for things to be scripted.
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
31 Dec 2015 12:24 AM
^Quite, its simple to others but to them its hard beacuase they are new to scripting
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
31 Dec 2015 12:25 AM
^Quiet*
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
31 Dec 2015 12:28 AM
You don't learn by asking others' to do your work.
Report Abuse
Flexes is not online. Flexes
Joined: 13 Apr 2015
Total Posts: 1584
31 Dec 2015 12:29 AM
I asked for help. As you can see, I posted a code that I ATTEMPTED to do. I didn't ask to redo the whole entire thing? I asked what should I do to make it work.

Learn to read.
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
31 Dec 2015 12:31 AM
Drah OP did EXACTLY what he was suppose to do. He attempting his best but fell short, so he asked for help.
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
31 Dec 2015 12:32 AM
Whoa now, don't start insulting me, my friend. Yes, you attempted to, and yes, you did ask for help when you got stuck, but did you do research before posting the question? How many times did you attempt to fix the code before posting the question?
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
31 Dec 2015 12:33 AM
He's been rude to you, he hasn't insulted you.
Report Abuse
Flexes is not online. Flexes
Joined: 13 Apr 2015
Total Posts: 1584
31 Dec 2015 12:33 AM
I've looked through open-sourced code, if that's what you call research.

& You're not doing any help so I'll just ignore you.
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
31 Dec 2015 12:36 AM
Notice how he ignored my other question, about how many times he attempted to fix his code.
I would defiantly help if I saw that he asked for such help on proper terms.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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