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: I need help on this little bug...

Previous Thread :: Next Thread 
vanisherfinder is not online. vanisherfinder
Joined: 21 Dec 2011
Total Posts: 792
29 Jul 2015 05:29 PM
That you can give certain tools to people to certain people?

Like I want to give one special tool to 2 people in a game, how do only they get it?

I have this

Players = {"Your Name", "A freind", "A freind", "A freind"}

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function()
for i=1,#Players do
if p.Name == Players[i] then
At = game.ServerStorage.SpecificTool:GetChildren()
for x=1,#At do
At[x]:Clone().Parent = p.Backpack
end
end
end
end)
end)


But it doesn't work...
What do I do to make it work and why is it like this?

- Vanisher

pls help :")
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
29 Jul 2015 05:32 PM
local admins = {"Player1","Player2"}
local tool = game.ServerStorage.Tool

game.Players.PlayerAdded:connect(function(player)
for i,v in next, admins do
if player.Name == v then
tool:Clone().Parent = player.Backpack
end
end
end)


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
29 Jul 2015 05:33 PM
u culd use free models but im n1c3

Players = {
['name'] = true,
['name'] = true
}

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:wait()
if Players[p.Name] then
local Tool = game.ServerStorage.Tools
for i,v in pairs(Tool:GetChildren()) do
v:Clone().Parent = p.StarterGear
v:Clone().Parent = p.Backpack
end
end
end)
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
29 Jul 2015 05:34 PM
local specialPeople = {a userid of a special person, another userid of a special person..}

local function isSpecial(plr)
for i, v in pairs(specialPeople) do
if plr.userId == v then return true end
end
return false
end

local tool = your tool

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
if isSpecial(plr) then
tool:Clone().Parent = plr.Backpack
end
end)
end)
Report Abuse
vanisherfinder is not online. vanisherfinder
Joined: 21 Dec 2011
Total Posts: 792
29 Jul 2015 05:37 PM
@All 3 of you

Is there also a way too remove the tools that is in the main team tools/starter tools? And then so the specific people just have the special tools?

Also, do I put the "special tools" in ServerStorage, or where?
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
29 Jul 2015 05:39 PM
if player.TeamColor == BrickColor.new("Bright blue") then
local char = player.Character
for i,v in next, char:GetChildren() do
if v:IsA("Tool") then
v:Destroy()
end
end
player.Backpack:ClearAllChildren()
end


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
vanisherfinder is not online. vanisherfinder
Joined: 21 Dec 2011
Total Posts: 792
29 Jul 2015 05:42 PM
Do I rename "Bright Blue" to my team color?

And do I put ("tool") the name of the tool I want? (Special)
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
29 Jul 2015 05:43 PM
Hmm...Why don't you find out? And if you run into problems then here is a post to help you out.

http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
vanisherfinder is not online. vanisherfinder
Joined: 21 Dec 2011
Total Posts: 792
29 Jul 2015 05:45 PM
I need it quickly, I have no time to learn to script all for this.
Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
29 Jul 2015 05:46 PM
>teamcolor

r u kidding me


siggys are controverial
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
29 Jul 2015 05:48 PM
"I have no time to learn to script all for this"

This is why I hate this forum.


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
vanisherfinder is not online. vanisherfinder
Joined: 21 Dec 2011
Total Posts: 792
29 Jul 2015 05:48 PM
robo and Time it doesn't work

Do you have a S K Y P E to share monitor screens?
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
29 Jul 2015 05:49 PM
try seeing if putting a

wait()

after the playeradded event works.


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
vanisherfinder is not online. vanisherfinder
Joined: 21 Dec 2011
Total Posts: 792
29 Jul 2015 05:50 PM
Do you have a S K Y P E to share monitor screens?
Report Abuse
vanisherfinder is not online. vanisherfinder
Joined: 21 Dec 2011
Total Posts: 792
29 Jul 2015 05:56 PM
I seriously don't understand please...
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
29 Jul 2015 05:58 PM
https://join.me/937-485-227


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
vanisherfinder is not online. vanisherfinder
Joined: 21 Dec 2011
Total Posts: 792
29 Jul 2015 05:59 PM
And when I say it's the specific people to remove the tools from the main starterpack. It's not the one whole team.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
29 Jul 2015 06:17 PM
local admins = {"Player1","Player2"}
local tool = game.ServerStorage.Tool1
local tool2 = game.ServerStorage.Tool2

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
for i,v in next, admins do
if player.Name == v then
for i,v in next, char:GetChildren() do
if v:IsA("Tool") then
v.Parent = player.Backpack
end
end
player.Backpack:ClearAllChildren()
tool:Clone().Parent = player.Backpack
tool2:Clone().Parent = player.Backpack
end
end
end)
end)


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
29 Jul 2015 06:18 PM
if player.TeamColor == BrickColor.new("Bright red") and player.Name == v then *

You can also do

if player.TeamColor == game:GetService("Teams").Team1.TeamColor


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
vanisherfinder is not online. vanisherfinder
Joined: 21 Dec 2011
Total Posts: 792
30 Jul 2015 09:31 AM
It all works, if you need robux come tell me.
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