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!?!?!

Previous Thread :: Next Thread 
ozza is not online. ozza
Joined: 11 Oct 2007
Total Posts: 726
27 May 2012 01:13 PM
Workspace.ChildAdded:connect(function(added)
local player = game.Players:playerFromCharacter(added)
if player ~= nil then
if player.IntroFin.Value == true then
if player.Class.Value == "Assassin" or player.Class.Value == "Dark Assassin" or player.Class.Value == "Rogue" or player.Class.Value == "Dark Rogue" then
game.Lighting["Assassin Left Arm"]:Clone().Parent = added
game.Lighting["Assassin Right Arm"]:Clone().Parent = added
game.Lighting["Assassin Left Leg"]:Clone().Parent = added
game.Lighting["Assassin Right Leg"]:Clone().Parent = added
game.Lighting["Assassin Torso"]:Clone().Parent = added
end
end
end
end
end)



y dis no work, no output



- ogm i r no nob y u noob
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
27 May 2012 01:15 PM
Use game.Players.PlayerAdded:connect(function() end)
Report Abuse
ServerLabs is not online. ServerLabs
Joined: 29 Dec 2010
Total Posts: 2263
27 May 2012 01:17 PM
watz wiff all dem endz LOLS N I thinzk Workspace is sposed 2 b lovverc4s3

~ Slabs ~
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
27 May 2012 01:19 PM
Too many ends, and so inefficient...
Report Abuse
ServerLabs is not online. ServerLabs
Joined: 29 Dec 2010
Total Posts: 2263
27 May 2012 01:24 PM
Inefficient? Please, do explain.
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
27 May 2012 01:32 PM
There are too many ends, and being me, I would prefer to do..

for i, v in pairs(game.Lighting:GetChildren()) do
if v.Name:Find("Assassin") then
v.Parent = player
end
end

Less code.
Report Abuse
ozza is not online. ozza
Joined: 11 Oct 2007
Total Posts: 726
27 May 2012 01:39 PM
Workspace.ChildAdded:connect(function(added)
local player = game.Players:playerFromCharacter(added)
if player ~= nil and player.IntroFin.Value == true then
if player.Class.Value == "Assassin" or player.Class.Value == "Dark Assassin" or player.Class.Value == "Rogue" or player.Class.Value == "Dark Rogue" then
for i, v in pairs(game.Lighting:GetChildren()) do
if v.Name:Find("Assassin") then
v.Parent = player
end
end
end
end
end)

-_-

Still doesn't work.



- ogm i r no nob y u noob
Report Abuse
ozza is not online. ozza
Joined: 11 Oct 2007
Total Posts: 726
27 May 2012 04:13 PM
Anyone?

- ogm i r no nob y u noob
Report Abuse
Moolah101 is not online. Moolah101
Joined: 22 Sep 2010
Total Posts: 614
27 May 2012 04:25 PM
One end.
Report Abuse
Moolah101 is not online. Moolah101
Joined: 22 Sep 2010
Total Posts: 614
27 May 2012 04:26 PM
Wait i think its four.
Report Abuse
ozza is not online. ozza
Joined: 11 Oct 2007
Total Posts: 726
27 May 2012 04:45 PM
There are 5 ends,

1 for the function
3 for all the ifs
and one for the 'for'

- ogm i r no nob y u noob
Report Abuse
ServerLabs is not online. ServerLabs
Joined: 29 Dec 2010
Total Posts: 2263
30 May 2012 05:16 PM
"Instance playerFromCharacter(Instance character)
Member of Players
Preliminary: This item is under development and is likely to change. Use only for experimental work.

Roblox Preliminary: This item is under development and is currently restricted for use by Roblox Admins only.

Deprecated: This item is deprecated. Do not use it for new work."

Use GetPlayerFromCharacter()

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