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: why wont this work

Previous Thread :: Next Thread 
H4xorus is not online. H4xorus
Joined: 30 Jun 2012
Total Posts: 10
03 Jul 2012 03:35 PM

game.Players.PlayerAdded:connect(function (player)
player.CharacterAdded:connect(function (character)
if character.Name == "crazyzee" or if character.Name == "H4xorus" then
new.Character.Torso.CFrame = CFrame.new(-50, 284.1, 23)
end)
end)

output says: 15:33:18 - Workspace.TP:5: unexpected symbol near 'if'
Report Abuse
WhiteRain is not online. WhiteRain
Joined: 24 Apr 2010
Total Posts: 2723
03 Jul 2012 03:36 PM
No need for a second if. And you aare also missing and end.

game.Players.PlayerAdded:connect(function (player)
player.CharacterAdded:connect(function (character)
if character.Name == "crazyzee" or character.Name == "H4xorus" then
new.Character.Torso.CFrame = CFrame.new(-50, 284.1, 23)
end
end)
end)
Report Abuse
crazyman32 is online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
03 Jul 2012 03:36 PM
if character.Name == "crazyzee" or if character.Name == "H4xorus" then

The 'if' in the middle should not be there. Also, just check the player name.


if player.Name == "crazyzee" or player.Name == "H4xorus" then
Report Abuse
WhiteRain is not online. WhiteRain
Joined: 24 Apr 2010
Total Posts: 2723
03 Jul 2012 03:37 PM
Nice latetoast there crazy xD
Report Abuse
ImperialWatch is not online. ImperialWatch
Joined: 13 Feb 2011
Total Posts: 16
03 Jul 2012 03:40 PM
also Character.Torso.CFrame = CFrame.new(-50, 284.1, 23)
Report Abuse
WhiteRain is not online. WhiteRain
Joined: 24 Apr 2010
Total Posts: 2723
03 Jul 2012 03:42 PM
Actually it's character.Torso....
Anyways updated code:
game.Players.PlayerAdded:connect(function (player)
player.CharacterAdded:connect(function (character)
if character.Name == "crazyzee" or character.Name == "H4xorus" then
character.Torso.CFrame = CFrame.new(-50, 284.1, 23)
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