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 » Scripting Helpers
Home Search
 

Re: Help me fix this script

Previous Thread :: Next Thread 
bigaquawave is not online. bigaquawave
Joined: 07 Sep 2010
Total Posts: 5629
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
NeffSkates is not online. NeffSkates
Joined: 11 May 2012
Total Posts: 284
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 is not online. 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 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
03 Jun 2012 02:12 PM
@Neff
Wouldn't work.
Report Abuse
bigaquawave is not online. bigaquawave
Joined: 07 Sep 2010
Total Posts: 5629
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 is not online. 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
bigaquawave is not online. bigaquawave
Joined: 07 Sep 2010
Total Posts: 5629
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 is not online. 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
bigaquawave is not online. bigaquawave
Joined: 07 Sep 2010
Total Posts: 5629
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
bigaquawave is not online. bigaquawave
Joined: 07 Sep 2010
Total Posts: 5629
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 is not online. 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 is not online. 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
bigaquawave is not online. bigaquawave
Joined: 07 Sep 2010
Total Posts: 5629
03 Jun 2012 02:31 PM
If you think that would help. Thanks.
Report Abuse
bigaquawave is not online. bigaquawave
Joined: 07 Sep 2010
Total Posts: 5629
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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