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: getplayers - player?

Previous Thread :: Next Thread 
Sweegz is online. Sweegz
Joined: 08 Apr 2013
Total Posts: 519
06 May 2017 07:42 PM
is it possible to get the players from the game and removing me from it


Report Abuse
Inductive is not online. Inductive
Joined: 28 May 2012
Total Posts: 6480
06 May 2017 07:46 PM
local players = game.Players:GetChildren()

for i = 1, #players do
if players[i].Name == "Sweegz" then
player:Kick() --Or Destroy() or whatever.
end
Report Abuse
Sweegz is online. Sweegz
Joined: 08 Apr 2013
Total Posts: 519
06 May 2017 07:46 PM
no i mean it gets all the other players and removes me from the list


Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
06 May 2017 07:47 PM
local function getPlayers(...)
local ignoreList = {...}
local players = {}

local function find(name)
for i, v in pairs(ignoreList) do
if v == name then
return true
end
end
end

for i, v in pairs(game.Players:GetPlayers()) do
if not find(v.Name) then
table.insert(players,v)
end
end

return v
end

getPlayers("Player1","Sweegz") --etc


send trades ⭐️ 🌟 ✨ ⚡️ 🔥 💥 ☄️
Report Abuse
Sweegz is online. Sweegz
Joined: 08 Apr 2013
Total Posts: 519
06 May 2017 07:50 PM
for _,player in pairs(game.Players:GetPlayers()) do
AnimationId = "33796059"
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://"..AnimationId
local k = player.Character.Humanoid:LoadAnimation(Anim) -- script will error if Humanoid doesnt exist in character
k:Play() --Play the animation
k:AdjustSpeed(math.huge) --Set '1' to any value you want to adjust the animation speed.
end

Sorry i dont get what you are writing as im a bad scripter but how would i remove me from this


Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
06 May 2017 07:59 PM
This is an interesting evening. The only people posting anything don't know how to script and want us to do it for them.


Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
06 May 2017 08:06 PM
Most evenings are an interesting evening then


Report Abuse
Sweegz is online. Sweegz
Joined: 08 Apr 2013
Total Posts: 519
06 May 2017 08:09 PM
well i do know but i still cant get rid of my player from the list and i dont want to make it complicated


Report Abuse
128Gigabytes is not online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
06 May 2017 08:12 PM
You'll need to be making your own playerlist then buddy.
Report Abuse
Sweegz is online. Sweegz
Joined: 08 Apr 2013
Total Posts: 519
06 May 2017 08:15 PM
stupid language glad i dont know it


Report Abuse
128Gigabytes is not online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
06 May 2017 08:17 PM
Its a strange thing to be apposed to any knowledge. It makes sense to decide you don't want to learn it, because it isn't free (It cost time in this case.) but to say you are glad you don't know it implies that if it was an on off switch you would choose to not know it, and that is stupid.
Report Abuse
Sweegz is online. Sweegz
Joined: 08 Apr 2013
Total Posts: 519
06 May 2017 08:18 PM
yes i need to add 15 lines to remove a stupid string from an list


Report Abuse
Sweegz is online. Sweegz
Joined: 08 Apr 2013
Total Posts: 519
06 May 2017 08:40 PM
500 robux if u fix this
doesnt work even if players == "sweegz" cause i dont exist appareantly


Report Abuse
Sweegz is online. Sweegz
Joined: 08 Apr 2013
Total Posts: 519
06 May 2017 08:45 PM
nvm fixed it


Report Abuse
128Gigabytes is not online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
06 May 2017 08:46 PM
we wish you didnt exist
Report Abuse
noobsrock114 is not online. noobsrock114
Joined: 29 Nov 2010
Total Posts: 356
06 May 2017 08:55 PM
Lul
Report Abuse
biboyevangelista is not online. biboyevangelista
Joined: 07 Feb 2013
Total Posts: 2
13 Jul 2017 12:40 AM
for _,player in pairs(game.Players:GetPlayers()) do
AnimationId = "33796059"
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://"..AnimationId
local k = player.Character.Humanoid:LoadAnimation(Anim) -- script will error if Humanoid doesnt exist in character
k:Play() --Play the animation
k:AdjustSpeed(99) --Set '1' to any value you want to adjust the animation speed.
end
Report Abuse
nullfeels is not online. nullfeels
Joined: 31 Mar 2017
Total Posts: 1215
13 Jul 2017 01:10 AM
JarodOfOrbiter:
"This is an interesting evening. The only people posting anything don't know how to script and want us to do it for them."

Disillusions:
"Most evenings are an interesting evening then"

I lol'd so hard at this. xD
Report Abuse
TheeDeathCaster is online. TheeDeathCaster
Joined: 19 Jun 2011
Total Posts: 1191
13 Jul 2017 02:43 AM
It's super simple:

local players = game:GetService('Players'):GetPlayers()

for i = 1, #players do
if players[i].Name == 'TheeDeathCaster' then
table.remove(players, i)
end
end

for i = 1, #players do
print(players[i].Name) -- Should not have you in it.
end

Super simple. :P
Report Abuse
KiwiTronik is not online. KiwiTronik
Joined: 18 Feb 2010
Total Posts: 3221
13 Jul 2017 03:23 AM
players = {}
ignore = "Sweegz"
for _,v in pairs (game.Players:GetPlayers()) do
if v.Name ~= ignore then table.insert(players, v) end
end

whyy everybody gotta complicate it
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