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

Previous Thread :: Next Thread 
EyeballWarrior4321 is not online. EyeballWarrior4321
Joined: 26 Dec 2012
Total Posts: 595
02 Feb 2013 08:04 PM
This makes it so that only the raiders can cross the lake. There's no output, but it doesn't work

raiders = game.Teams.Raiders
players = game.Players
x = game.Players:GetChildren()

function raiderslake(part)
guy = part.Parent.Name
if game.Players.guy ~= nil then
for i = 1, x do
if x[i].Name == guy then
if x[i].TeamColor == "Raiders" then
end
else if x[i].TeamColor == "Nightingale Legion" then
guy.Parent:BreakJoints()
end
end
end
end
end
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
02 Feb 2013 08:07 PM
You need to use Touched event
Report Abuse
EyeballWarrior4321 is not online. EyeballWarrior4321
Joined: 26 Dec 2012
Total Posts: 595
02 Feb 2013 08:12 PM
Omg, I'm such a dumb@$$..
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
02 Feb 2013 08:12 PM
Stuff like that happens to me all the time
Report Abuse
EyeballWarrior4321 is not online. EyeballWarrior4321
Joined: 26 Dec 2012
Total Posts: 595
02 Feb 2013 08:26 PM
Still doesn't work
Report Abuse
YellowBrick1 is not online. YellowBrick1
Joined: 06 May 2009
Total Posts: 865
02 Feb 2013 08:28 PM
raiders = game.Teams.Raiders
players = game.Players
x = game.Players:GetChildren()

function raiderslake(part)
guy = part.Parent.Name
if game.Players[guy] ~= nil then
for i = 1, #x do
if x[i].Name == guy then
if x[i].TeamColor == "Raiders" then
end
else if x[i].TeamColor == "Nightingale Legion" then
part.Parent:BreakJoints()
end
end
end
end
end

-- Here are some revisions.
Report Abuse
EyeballWarrior4321 is not online. EyeballWarrior4321
Joined: 26 Dec 2012
Total Posts: 595
02 Feb 2013 08:31 PM
Now all I have to do now is watch 2 guys fight over some errors until I get a working script.
Report Abuse
EyeballWarrior4321 is not online. EyeballWarrior4321
Joined: 26 Dec 2012
Total Posts: 595
03 Feb 2013 01:58 PM
Bump
Report Abuse
EyeballWarrior4321 is not online. EyeballWarrior4321
Joined: 26 Dec 2012
Total Posts: 595
03 Feb 2013 02:01 PM
Nvm

raiders = game.Teams.Raiders
players = game.Players
x = game.Players:GetChildren()

function raiderslake(part)
guy = part.Parent.Name
if game.Players.guy ~= nil then
for i = 1, x do
if x[i].Name == guy then
if x[i].TeamColor == raiders.TeamColor then
end
else if x[i].TeamColor ~= raiders.TeamColor then
guy.Parent:BreakJoints()
end
end
end
end
end
Report Abuse
EyeballWarrior4321 is not online. EyeballWarrior4321
Joined: 26 Dec 2012
Total Posts: 595
03 Feb 2013 07:03 PM
Bump

My fix didn't work
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
03 Feb 2013 07:07 PM
raiders = Game.Teams.Raiders
players = Game.Players
x = players:GetChildren()

function raiderslake(part)
if players:GetPlayerFromCharacter(part.Parent) then
local player = players:GetPlayerFromCharacter(part.Parent)
if player.TeamColor = raiders.TeamColor then
print "Raider"
elseif player.TeamColor ~= raiders.TeamColor then
part.Parent:BreakJoints()
end
end
end

Make sure you run it.
Report Abuse
EyeballWarrior4321 is not online. EyeballWarrior4321
Joined: 26 Dec 2012
Total Posts: 595
03 Feb 2013 07:18 PM
Your worked :D
Report Abuse
bigdaddy92 is not online. bigdaddy92
Joined: 17 Jan 2010
Total Posts: 1684
03 Feb 2013 07:22 PM
'for i = 1,x' shouldn't that be #x?

-bigdaddy92, Professional Web Developer & Master Scripter
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