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: DynamicLightning Torso Help!!!

Previous Thread :: Next Thread 
MMOfficial is not online. MMOfficial
Joined: 20 May 2013
Total Posts: 276
17 Jun 2013 04:21 PM
function onPlayerEntered(newPlayer)
local l = Instance.new("PointLight")
l.Brightness = 2
l.Range = 4
l.Color = Color3.new(188, 202, 58)
l:clone().Parent = newPlayer.CharacterTorso
end
game.Players.ChildAdded:connect(onPlayerEntered)

-- It makes a player's torso light up... any problems?
Please make a major edit if I'm wrong.

I tried it and it doesn't work...
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
17 Jun 2013 04:22 PM
game.Players.PlayerAdded:connect(function(plr)
local l = Instance.new("PointLight", plr.Character.Torso)
l.Brightness = 2
l.Range = 4
l.Color = Color3.new(188, 202, 58)
end)
Report Abuse
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
17 Jun 2013 04:22 PM
function onPlayerEntered(newPlayer)
local l = Instance.new("PointLight")
l.Brightness = 2
l.Range = 4
l.Color = Color3.new(188, 202, 58)
l:clone().Parent = newPlayer.Character.Torso
end
game.Players.ChildAdded:connect(onPlayerEntered)
-- You forgot a dot between Character and Torso
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
17 Jun 2013 04:23 PM
Game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
local Light = Instance.new("PointLight")
Light.Brightness = 2
Light.Range = 4
Light.Color = Color3.new(188/255, 202/255, 58/255)
repeat wait(1/30) until Character:FindFirstChild("Torso")
Light.Parent = Character.Torso
end)
end)
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
17 Jun 2013 04:23 PM
perpetual pay attention to bad scripts like this, he names his function (newPlayer) at the top but at bottom it says :connect(onPlayerEntered)
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
17 Jun 2013 04:24 PM
codies is more effeicant or however ur spell
Report Abuse
MMOfficial is not online. MMOfficial
Joined: 20 May 2013
Total Posts: 276
17 Jun 2013 04:25 PM
Tried the first 2 comments, but no luck
Report Abuse
MMOfficial is not online. MMOfficial
Joined: 20 May 2013
Total Posts: 276
17 Jun 2013 04:26 PM
Dude, it was supposed to be onPlayerEntered... you put what is behind (Inside here)
Learn2Script
Report Abuse
MMOfficial is not online. MMOfficial
Joined: 20 May 2013
Total Posts: 276
17 Jun 2013 04:27 PM
Bump
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
17 Jun 2013 04:27 PM
[ Content Deleted ]
Report Abuse
MMOfficial is not online. MMOfficial
Joined: 20 May 2013
Total Posts: 276
17 Jun 2013 04:28 PM
Still no luck
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
17 Jun 2013 04:29 PM
Try increasing the range and brightness.

Game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
local Light = Instance.new("PointLight")
Light.Brightness = 10
Light.Range = 10
Light.Color = Color3.new(188/255, 202/255, 58/255)
repeat wait(1/30) until Character:FindFirstChild("Torso")
Light.Parent = Character.Torso
end)
end)

Report Abuse
MMOfficial is not online. MMOfficial
Joined: 20 May 2013
Total Posts: 276
17 Jun 2013 04:29 PM
yah, but why do I need that?
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
17 Jun 2013 04:30 PM
you are such an idiot get out
we try to help you and you and your brain u call a rock thinks it matters what u call a function
Report Abuse
MMOfficial is not online. MMOfficial
Joined: 20 May 2013
Total Posts: 276
17 Jun 2013 04:31 PM
No luck :(
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
17 Jun 2013 04:31 PM
good
Report Abuse
MMOfficial is not online. MMOfficial
Joined: 20 May 2013
Total Posts: 276
17 Jun 2013 04:32 PM
Bump...
Report Abuse
MMOfficial is not online. MMOfficial
Joined: 20 May 2013
Total Posts: 276
17 Jun 2013 04:39 PM
Help plz
Report Abuse
MMOfficial is not online. MMOfficial
Joined: 20 May 2013
Total Posts: 276
17 Jun 2013 04:40 PM
Whoever can fix gets a free gun in my current game
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
17 Jun 2013 04:41 PM
noone wants ur freemodel guns
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
17 Jun 2013 04:42 PM
@masterblokz what?


@OP
game.Players.PlayerAdded:connect(function(newPlayer)
repeat wait(); until (newPlayer.Character);
local l = Instance.new("PointLight", newPlayer.Character.Torso);
l.Brightness = 2;
l.Range = 4;
l.Color = Color3.new(188 / 255, 202 / 255, 58 / 255)
end);
Report Abuse
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
17 Jun 2013 04:44 PM
The 2nd comment should work. And also remember that the onPlayerEntered function doesn't work in solo. You can only test this script after you publish it in your places.
Report Abuse
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
17 Jun 2013 04:45 PM
I meant the 4th comment
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
17 Jun 2013 04:45 PM
perp, before you help, learn how to script.
god

theres no such thing as a onplayentered function
Report Abuse
Joshuats is online. Joshuats
Joined: 14 May 2008
Total Posts: 847
17 Jun 2013 04:45 PM
@MMOfficial

Are you trying this script out in Tools>Test>Play Solo? If so, that may be the reason why the script may not be working.
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