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
 

Help for my little script?

Previous Thread :: Next Thread 
Visdude11 is not online. Visdude11
Joined: 20 Jun 2010
Total Posts: 42
08 Jul 2011 03:05 AM
Hey guys.

I am an scripter, so I can script great things, but Ive always sucked at endings.

So I wondered how many end`s I need on this script:

game.Players.PlayerAdded:connect(function(Player)
if (Player:IsInGroup(222634)==true) and script.Group.Value == true then
print(Player.Name.. " is from team green forest")
Char:MoveTo(script.Parent.Position)
else
end


I tried to do that who the output said, so I put in extra end.
And after that I added another extra end.

So it was:

game.Players.PlayerAdded:connect(function(Player)
if (Player:IsInGroup(222634)==true) and script.Group.Value == true then
print(Player.Name.. " is from team green forest")
Char:MoveTo(script.Parent.Position)
else
end end end

Then I tried this:

game.Players.PlayerAdded:connect(function(Player)
if (Player:IsInGroup(222634)==true) and script.Group.Value == true then
print(Player.Name.. " is from team green forest")
Char:MoveTo(script.Parent.Position)
else
end end end()

and this:

game.Players.PlayerAdded:connect(function(Player)
if (Player:IsInGroup(222634)==true) and script.Group.Value == true then
print(Player.Name.. " is from team green forest")
Char:MoveTo(script.Parent.Position)
else
end end() end


I cant get it to work, so please help me.
Report Abuse
pridak245 is not online. pridak245
Joined: 22 Feb 2009
Total Posts: 5089
08 Jul 2011 03:08 AM
How many blue letters are there? If there 2 then,
end
end
If there are 3 then,
end
end
end
Etc.
Report Abuse
DDlover89 is not online. DDlover89
Joined: 06 Jul 2011
Total Posts: 3
08 Jul 2011 03:21 AM
i need help with scripting
Report Abuse
DDlover89 is not online. DDlover89
Joined: 06 Jul 2011
Total Posts: 3
08 Jul 2011 03:21 AM
i need help wuth scripting!!!!!
Report Abuse
DDlover89 is not online. DDlover89
Joined: 06 Jul 2011
Total Posts: 3
08 Jul 2011 03:22 AM
can you help meh with scripting?!? that would be great
Report Abuse
OBFAlt is not online. OBFAlt
Joined: 06 Jul 2011
Total Posts: 35
08 Jul 2011 03:38 AM
*takes Lua book of Luaness and slaps DD with it*

BE ENLIGHTENED!
Report Abuse
Visdude11 is not online. Visdude11
Joined: 20 Jun 2010
Total Posts: 42
08 Jul 2011 03:49 AM
I tried it, but it wasnt really helpfull..


The output says:
Workspace.Group spawn.spawn:6: ')' expected (to close '(' at line 1) near 'end'

How do I close that?
Report Abuse
UttermostExedra is not online. UttermostExedra
Joined: 28 Dec 2009
Total Posts: 2483
08 Jul 2011 03:50 AM
I doubt it taht you're a great scripter.. -.-


game.Players.PlayerAdded:connect(function(Player)
if (Player:IsInGroup(222634)==true) and script.Group.Value == true then
print(Player.Name.. " is from team green forest")
Char:MoveTo(script.Parent.Position)
else
end
end)


You need a extra parenthesis to close the anonymous function.

Report Abuse
UttermostExedra is not online. UttermostExedra
Joined: 28 Dec 2009
Total Posts: 2483
08 Jul 2011 03:52 AM
Also, where did you define 'Char' ?


game.Players.PlayerAdded:connect(function(Player)
if (Player:IsInGroup(222634)==true) and script.Group.Value == true then
print(Player.Name.. " is from team green forest")
Player.Character:MoveTo(script.Parent.Position)
else
print("Not green forest.")
end
end)
Report Abuse
Visdude11 is not online. Visdude11
Joined: 20 Jun 2010
Total Posts: 42
08 Jul 2011 03:58 AM
Thanks, I left roblox for 5 months and got to train scripting again :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