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
 

Lighting not working?

Previous Thread :: Next Thread 
dapbetatester is not online. dapbetatester
Joined: 18 Jan 2010
Total Posts: 1321
03 Nov 2011 07:13 PM
-- Lighting

    function light(newPlayer)
        Workspace.Light.Position = newPlayer.Character.Torso.Position
    end


game.Players.PlayerAdded:connect(light)


After I move, it won't move.

No errors.
Report Abuse
BobGeorgenworn909 is not online. BobGeorgenworn909
Joined: 03 Apr 2008
Total Posts: 1161
03 Nov 2011 07:16 PM
Make a second script, name it moveLight, and put this in it:

while wait() do
game.Workspace.Light.Position = script.Parent.Torso.Position
end




And change the original script to this

game.Players.PlayerAdded:connect(function(p)
repeat wait()
until p.Character
copy = game.Workspace.moveLight:clone()
copy.Parent = p.Character
end)
Report Abuse
dapbetatester is not online. dapbetatester
Joined: 18 Jan 2010
Total Posts: 1321
03 Nov 2011 07:22 PM
I need it go not up the player, down.
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
03 Nov 2011 07:22 PM
    function light(newPlayer)
        lite = game.Workspace.Light.Position = newPlayer.Character.Torso.Position
        lite.Parent = newPlayer.Character.Torso
        t = newPlayer
        return t
    end
    game.Players.PlayerAdded:connect(light)
    
    if t.Light.Position = t.Position then end
    else
    t.Light.Position = t.Position
    end
    end


Hope this works, if not tell me the output.
Report Abuse
BobGeorgenworn909 is not online. BobGeorgenworn909
Joined: 03 Apr 2008
Total Posts: 1161
03 Nov 2011 07:22 PM
Explain?
Report Abuse
BobGeorgenworn909 is not online. BobGeorgenworn909
Joined: 03 Apr 2008
Total Posts: 1161
03 Nov 2011 07:23 PM
How dare you post before me!
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