|
| 03 Jun 2012 02:07 PM |
The purpose of this is to make certain people spawn with special perks such as weapons and extra health
game.Workspace.ChildAdded:connect(function(player) if player.Name == "Person name" or player.Name == "Person name" then--Go local playe = game.Players:GetPlayerFromCharacter(player) game.Lighting.Tool.Parent = playe.BackPack player.Humanoid.Health = 1500000 player.Humanoid.WalkSpeed = 1000 player.Humanoid.MaxHealth = player.Humanoid.Health end end) |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 02:10 PM |
game.Workspace.ChildAdded:connect(function(player) if player.Name == "Person name" or player.Name == "Person name" then--Go local player = game.Players:GetPlayerFromCharacter(player) game.Lighting.Tool.Parent = playe.BackPack player.Humanoid.Health = 1500000 player.Humanoid.WalkSpeed = 1000 player.Humanoid.MaxHealth = player.Humanoid.Health end end) |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 03 Jun 2012 02:12 PM |
game.Players.PlayerAdded:connect(function(p) if p.Name == "miz656" or p.Name == "Player" then repeat wait() until p:FindFirstChild("Backpack") game.Lighting.Tool.Parent = p.Backpack pcall(function() p.Character.Humanoid.Health = math.huge p.Character.Humanoid.WalkSpeed = 1000 p.Character.Humanoid.MaxHealth = p.Character.Humanoid.Health end) end end)
|
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
|
| 03 Jun 2012 02:14 PM |
| @miz656 Do I just put that in a blank script, or add any other code to it? |
|
|
| Report Abuse |
|
|
1pie23
|
  |
| Joined: 11 Jul 2010 |
| Total Posts: 1865 |
|
|
| 03 Jun 2012 02:15 PM |
| Miz is right. You have to use game.Players not game.Workspace. I mean, you could use game.Workspace, but it's a little harder. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 02:17 PM |
| @1pie23 Do i just put that in my script? And if I want multiple VIP's can I just copy and paste this script and just change the name of the player? |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 03 Jun 2012 02:17 PM |
@big
Blank script and change the name to your name.
@pie
Yeah. You could do it, but it's a little less efficient. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 02:20 PM |
@miz656
Thanks for averything. If I want mutiple VIP's can I just copy and paste this into the script but with different names, or do I have to add seperate scripts? |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 02:25 PM |
And do either of you know how I can do a script like this:
gui that looks like a hint that shows how many members are needed until a raid is official, it should count down when a member of the clan enters: Example: Waiting for 5 more members of RAT>CT enters> Waiting for 4 more members of RAT
I've only just begun scripting, sorry.
|
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 03 Jun 2012 02:26 PM |
I would use a playeradded event and wait until the number of members are ready to raid.
|
|
|
| Report Abuse |
|
|
1pie23
|
  |
| Joined: 11 Jul 2010 |
| Total Posts: 1865 |
|
|
| 03 Jun 2012 02:29 PM |
local raidnum = 20
repeat wait() until game.Players:GetPlayers() == raindum
I'm a bit confused though. Would you have to do #game.Players:GetPlayers()? Or is mine fine. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 02:31 PM |
| If you think that would help. Thanks. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 02:35 PM |
@1pie
If that counts down when they enter, then it's fine. Would I be able to add a screen GUI that shows the information? radnum=20? I assume that is how many raiders tehre must be? |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 03 Jun 2012 02:42 PM |
1Pie
Like this :P
local raidnum = 20
repeat wait() until game.Players.NumPlayers >= raidnum
Yep, there's a NumPlayers :P
|
|
|
| Report Abuse |
|
|