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 » Scripters
Home Search
 

Re: script help

Previous Thread :: Next Thread 
Felmyst is not online. Felmyst
Joined: 24 Feb 2010
Total Posts: 18033
17 May 2016 04:17 PM
so im trying to make dyamic lighting on the character (which is already made)
but i want a button on your keyboard to make it activate.

how would you make it so that it will work?


Report Abuse
Felmyst is not online. Felmyst
Joined: 24 Feb 2010
Total Posts: 18033
17 May 2016 04:18 PM
this is the script btw






function onPlayerEntered(newPlayer)
repeat wait() until newPlayer.Character
local l = Instance.new("PointLight", newPlayer.Character:WaitForChild("Torso"))
l.Brightness = 100
l.Range = 4
while true do
wait(1)
l.Color = Color3.new(245,245,245)
end
end

for _,pl in pairs(game.Players:GetPlayers()) do
onPlayerEntered(pl)
end

game.Players.ChildAdded:connect(onPlayerEntered)



Report Abuse
Felmyst is not online. Felmyst
Joined: 24 Feb 2010
Total Posts: 18033
17 May 2016 04:19 PM
1


Report Abuse
Felmyst is not online. Felmyst
Joined: 24 Feb 2010
Total Posts: 18033
17 May 2016 04:21 PM
2


Report Abuse
Felmyst is not online. Felmyst
Joined: 24 Feb 2010
Total Posts: 18033
17 May 2016 04:22 PM
lol i misspelled dynamic

my bad


Report Abuse
Service_Scripting is not online. Service_Scripting
Joined: 28 Mar 2013
Total Posts: 944
17 May 2016 04:25 PM
lol, if your trying to make a light in a character's torso you don't need to be so complicated.


#code game.Workspace.YourMom.LastNight = true
Report Abuse
Felmyst is not online. Felmyst
Joined: 24 Feb 2010
Total Posts: 18033
17 May 2016 04:27 PM
thats not what im trying to do

say if i pressed the letter F, the dynamic lighting will turn on the character.
but if i were to press F again, it would turn off


Report Abuse
Service_Scripting is not online. Service_Scripting
Joined: 28 Mar 2013
Total Posts: 944
17 May 2016 04:27 PM
mmm ok


#code game.Workspace.YourMom.LastNight = true
Report Abuse
Felmyst is not online. Felmyst
Joined: 24 Feb 2010
Total Posts: 18033
17 May 2016 04:27 PM
how 2 make it


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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