|
| 11 Apr 2015 10:31 PM |
Does anyone have a model with instructions on how to do this. I want to add a couple of tools, but I don't want others, other then certain people to have. It's not a VIP pass or anything, just: "So-and-so gets this tool when entering game"
So, if there is any model or script, IDK, just hoping someone can give me one that is like what I said above.. I'm not experienced with scripting, so please don't put code below unless there is instructions, heh. |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2015 10:39 PM |
game.Players.PlayerAdded:connect(function(newP) if newP.Name == 'ImperialClique' then game.ServerStorage.Tool1:Clone().Parent = newP.StarterGear game.ServerStorage.Tool1:Clone().Parent = newP.Backpack game.ServerStorage.Tool2:Clone().Parent = newP.StarterGear game.ServerStorage.Tool2:Clone().Parent = newP.Backpack game.ServerStorage.Tool3:Clone().Parent = newP.StarterGear game.ServerStorage.Tool3:Clone().Parent = newP.Backpack end end) |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2015 10:55 PM |
Umm, thanks, somewhat. I put it in a script, then put the tools in the ServerStorage, but nothing happened. Is there anything else I need to do? I tried also changing 'ImperialClique' to "ImperialClique", still nothing.
And this doesn't really help when Admins can do ":give me all". |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2015 11:18 PM |
| did you change name of tools? |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 11:23 AM |
I did this:
game.Players.PlayerAdded:connect(function(newP) if newP.Name == "ImperialClique" then game.ServerStorage.Tool1:Clone("Item 1").Parent = newP.StarterGear game.ServerStorage.Tool1:Clone("Item 1").Parent = newP.Backpack game.ServerStorage.Tool2:Clone("Item 2").Parent = newP.StarterGear game.ServerStorage.Tool2:Clone("Item 2").Parent = newP.Backpack game.ServerStorage.Tool3:Clone().Parent = newP.StarterGear game.ServerStorage.Tool3:Clone().Parent = newP.Backpack end end)
Is there something I am doing wrong? |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 11:27 AM |
game.Players.PlayerAdded:connect(function(newP) if newP.Name == "ImperialClique" then game.ServerStorage.Tool1:Clone().Parent = newP.StarterGear game.ServerStorage.Tool1:Clone().Parent = newP.Backpack game.ServerStorage.Tool2:Clone().Parent = newP.StarterGear game.ServerStorage.Tool2:Clone().Parent = newP.Backpack game.ServerStorage.Tool3:Clone().Parent = newP.StarterGear game.ServerStorage.Tool3:Clone().Parent = newP.Backpack end end) |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 12:00 PM |
| Where do I put the tool names? |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 12:47 PM |
Replace tool1,tool2, and tool3 in both spots
I did a push-up today. Well, I fell, and used my arms to get up. Close enough. ~ShwegSiggy. |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 01:45 PM |
Ok, the first tool worked, but when I changed Tool2 to the name of the tool, it doesn't work.
Any ideas? |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 01:46 PM |
| Does it have a space in it? If so replace .ToolName with ["ToolName"] |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 02:13 PM |
I changed all the names of the tools to have no spaces.
I tried adding the "'s, didn't work. tried added the ["___"], didn't work.
Another thing that I forgot the mention, was that when I die, I don't get the tools again, only when I join. |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 02:34 PM |
| Take of the startergear line.. |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2015 06:32 PM |
| That just made it broken... |
|
|
| Report Abuse |
|
|
Amnesilox
|
  |
| Joined: 21 Sep 2012 |
| Total Posts: 3540 |
|
|
| 14 Apr 2015 06:37 PM |
Example
DarkHeart
write it like that not ["DarkHeart"]
-_- |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2015 10:03 PM |
Maybe I need to repeat myself.
"I tried adding the "'s, didn't work."
-_- |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2015 10:03 PM |
| As well as without the quotations. |
|
|
| Report Abuse |
|
|
Amnesilox
|
  |
| Joined: 21 Sep 2012 |
| Total Posts: 3540 |
|
|
| 14 Apr 2015 10:07 PM |
| You unlucky then, try it ingame maybe. |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2015 04:30 PM |
| How does someone get "unlucky" with scripts. Scripts aren't a game of chance... |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2015 05:09 PM |
| Try adding wait() to the top of the script, thats what i did and the script works fine for me. |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2015 04:32 PM |
Well the current script is this:
wait() game.Players.PlayerAdded:connect(function(newP) if newP.Name == "ImperialClique" then game.ReplicatedStorage.Buildingtools:Clone().Parent = newP.StarterGear game.ReplicatedStorage.Buildingtools:Clone().Parent = newP.Backpack game.ReplicatedStorage.Staff:Clone().Parent = newP.StarterGear game.ReplicatedStorage.Staff:Clone().Parent = newP.Backpack game.ServerStorage.Tool3:Clone().Parent = newP.StarterGear game.ServerStorage.Tool3:Clone().Parent = newP.Backpack end end)
And the "Staff" doesn't seem to come into my inventory. |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2015 07:09 PM |
| He gave you a perfectly working script then you just.. |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2015 08:03 PM |
local tool1 = TOOLNAME
game.Players.PlayerAdded:connect(function(speshul) if newP.Name == "ImperialClique" then game.ServerStorage:FindFirstChild(tool1):Clone().Parent = speshul.StarterGear game.ServerStorage:FindFirstChild(tool1):Clone().Parent = speshul.Backpack end end)
"This is the day of the dead, this is ain't no day in the park" - HollyWood Undead; Day of the Dead |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2015 08:04 PM |
if speshul.Name*
Copied and pasted the guy's code above, made it a little more user-friendly; made an error when I was making a joke in it.
"This is the day of the dead, this is ain't no day in the park" - HollyWood Undead; Day of the Dead |
|
|
| Report Abuse |
|
|
|
| 21 Apr 2015 07:15 PM |
game.Players.PlayerAdded:connect(function(speshul) if speshul.Name == "ImperialClique" then game.ReplicatedStorage:FindFirstChild(Buildingtools):Clone().Parent = speshul.StarterGear game.ReplicatedStorage:FindFirstChild(Buildingtools):Clone().Parent = speshul.Backpack end end)
Not working, any idea? |
|
|
| Report Abuse |
|
|
|
| 21 Apr 2015 07:16 PM |
game.Players.PlayerAdded:connect(function(plr) if plr.Name == "ImperialClique" then game.ReplicatedStorage:FindFirstChild(Buildingtools:GetChildren()):Clone().Parent = plr.StarterGear game.ReplicatedStorage:FindFirstChild(Buildingtools:GetChildren()):Clone().Parent = plr.Backpack end end)
God grant me the wisdom to not punch stupid ppl, for I know I will go to prison. |
|
|
| Report Abuse |
|
|