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
 

indexing a nil value?

Previous Thread :: Next Thread 
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
05 Aug 2013 07:16 PM
Thats my output.
Its says its line 6 :P

I am attempting to create a LOCAL point light that follows your player around.
Im only using the while true do because I dont think you can weld between the server and the client.


a = Instance.new("Part")
a.Parent = game.Players.LocalPlayer.Character
a.Size = Vector3.new(1,1,1)
a.CanCollide = false
a.Anchored = true
a.Position = game.Players.LocalPlayer.Character.Torso.Position
a.Transparency = 1
a.Parent = game.Workspace.CurrentCamera
a.Name = "Light"
b = Instance.new("PointLight")
b.Parent = a
b.Range = 30
while true do
    a.Position = game.Players.LocalPlayer.Character.Torso.Position
    wait()
    end
    

Report Abuse
WishNite is not online. WishNite
Joined: 11 Feb 2009
Total Posts: 15828
05 Aug 2013 07:19 PM
possibly add a repeat wait() until game.Players.LocalPlayer.Character at the top?
Report Abuse
gijsbel11 is not online. gijsbel11
Joined: 07 Feb 2009
Total Posts: 4223
05 Aug 2013 07:23 PM
PCall the whole thing, or do what wishnite said. Should fix it.
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
05 Aug 2013 07:33 PM
Oh. Thanks :D
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
05 Aug 2013 07:34 PM
Lets say I wanted to weld a part to the torso, and it was a local brick.
Could I do that instead of thw while true do?
Or am I correct about it not being possible
Report Abuse
gijsbel11 is not online. gijsbel11
Joined: 07 Feb 2009
Total Posts: 4223
05 Aug 2013 07:37 PM
You can indeed weld the brick to the torse and eliminate the while loop!
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