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: I need help with creating a script I don't how to code.

Previous Thread :: Next Thread 
alex65594 is not online. alex65594
Joined: 06 Feb 2011
Total Posts: 24
17 Sep 2014 04:23 PM
Hi, I recently started studying the lua language and created my first game. But it is not done yet. I created most of the game's script.I need help with giving players on a certain team certain tools and removing them after they're not on the team anymore. I also need help with giving certain players on a certain team rewards once they are on the team and giving them the same rewards if they leave and join the team again. Any help is appreciated. :)
Report Abuse
demon8845 is not online. demon8845
Joined: 07 Feb 2010
Total Posts: 335
17 Sep 2014 04:56 PM
I know for sure that this sub forum only fixes scripts not makes.
Report Abuse
alex65594 is not online. alex65594
Joined: 06 Feb 2011
Total Posts: 24
17 Sep 2014 06:09 PM
bump
Report Abuse
domogomo is not online. domogomo
Joined: 03 Jun 2012
Total Posts: 335
17 Sep 2014 06:38 PM
I know for sure that this sub forum only fixes scripts not makes.
Report Abuse
alex65594 is not online. alex65594
Joined: 06 Feb 2011
Total Posts: 24
17 Sep 2014 07:04 PM
Here's my a bit of my script:
__________________________________________________________________________
for i=1, #a do
if a[i].TeamColor==BrickColor.new(1010) then
a[i].Character.Torso.CFrame = CFrame.new(Vector3.new(121, 43.4, -51.6))
elseif a[i].TeamColor==BrickColor.new(37) then
a[i].leaderstats.Credits.Value = a[i].leaderstats.Credits.Value + 30
a[i].leaderstats.Wins.Value = a[i].leaderstats.Wins.Value + 1
wait(2)
_________________________________________________________________________
How do I make it so it will effect all players on the team. Right now it only affects one player on the team. Please help!!
Report Abuse
alex65594 is not online. alex65594
Joined: 06 Feb 2011
Total Posts: 24
17 Sep 2014 07:26 PM
bump
Report Abuse
alex65594 is not online. alex65594
Joined: 06 Feb 2011
Total Posts: 24
17 Sep 2014 08:19 PM
bump
Report Abuse
alex65594 is not online. alex65594
Joined: 06 Feb 2011
Total Posts: 24
17 Sep 2014 09:29 PM
bump
Report Abuse
alex65594 is not online. alex65594
Joined: 06 Feb 2011
Total Posts: 24
18 Sep 2014 07:05 AM
bump
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
18 Sep 2014 07:17 AM
We typically don't do scripts for you.
http://wiki.roblox.com/ might be able to help you learn though :D
Report Abuse
alex65594 is not online. alex65594
Joined: 06 Feb 2011
Total Posts: 24
18 Sep 2014 07:31 AM

for i=1, #a do
if a[i].TeamColor==BrickColor.new(1010) then
a[i].Character.Torso.CFrame = CFrame.new(Vector3.new(121, 43.4, -51.6))
elseif a[i].TeamColor==BrickColor.new(37) then
a[i].leaderstats.Credits.Value = a[i].leaderstats.Credits.Value + 30
a[i].leaderstats.Wins.Value = a[i].leaderstats.Wins.Value + 1
wait(2)
_________________________________________________________________________________
What I meant was to fix this script so instead of only affecting one player at 1 time I want it to affect all players at one time.
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
18 Sep 2014 07:39 AM
I think the table A only have one player
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
18 Sep 2014 07:44 AM
a = game.Players:GetPlayers()
for i=1, #a do
pcall(function()
if a[i].TeamColor==BrickColor.new(1010) then
a[i].Character.Torso.CFrame = CFrame.new(Vector3.new(121, 43.4, -51.6))
elseif a[i].TeamColor==BrickColor.new(37) then
a[i].leaderstats.Credits.Value = a[i].leaderstats.Credits.Value + 30
a[i].leaderstats.Wins.Value = a[i].leaderstats.Wins.Value + 1
end
end)
end
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