Hppolice
|
  |
| Joined: 06 Feb 2012 |
| Total Posts: 578 |
|
|
| 15 Sep 2013 10:48 AM |
Hi,
For a training place, I'm making a spotlight script, where when the training starts, a trainer could say, :on sp1 (Spotlight 1), and the dynamic lighting Spotlight would be enabled. (it stays disabled)
I started doing a script, it didn't work out. Any help would be well appreciated!
Also, I would like only HR's to be able to say this, and I forgot how to make that admin script. I kinda feel lazy to look it up right now... lol
Script: --------------------------------------------------------------------------
function onChatted(msg, speaker) source = string.lower(speaker.Name) msg = string.lower(msg) if msg == ":on sp1" then script.Parent.StringValue.Value = "Disabled" script.Parent.StringValue.Value = "Enabled" script.Parent.Parent.Part1.SpotLight.Enabled = true script.Parent.Parent.Part2.SpotLight.Enabled = true script.Parent.Parent.Part3.SpotLight.Enabled = true script.Parent.Parent.Part4.SpotLight.Enabled = true else if script.Parent.StringValue.Value = "Enabled" script.Parent.StringValue.Value = "Disabled" script.Parent.Parent.Part1.SpotLight.Enabled = false script.Parent.Parent.Part2.SpotLight.Enabled = false script.Parent.Parent.Part3.SpotLight.Enabled = false script.Parent.Parent.Part4.SpotLight.Enabled = false end
if msg == ":on sp2" then script.Parent.Parent.Spotlight2.Light.enabled.Spotlight = true end if msg == ":on sp3" then script.Parent.Parent.Spotlight3.Light.enabled.Spotlight = true end if msg == ":on linesp1" then script.Parent.Parent.LineSpotlight1.Light.enabled.Spotlight = true end if msg == ":on linesp2" then script.Parent.Parent.LineSpotlight2.Light.enabled.Spotlight = true end end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg) onChatted(msg, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered)
------------------------------------------------------------------------------------
Thanks for you help!
Hppolice UCR- HRiT |
|
|
| Report Abuse |
|
|
Xtreme101
|
  |
| Joined: 03 Jan 2009 |
| Total Posts: 4385 |
|
|
| 15 Sep 2013 10:50 AM |
light.enabled.SpotLight?
What? |
|
|
| Report Abuse |
|
|
Hppolice
|
  |
| Joined: 06 Feb 2012 |
| Total Posts: 578 |
|
|
| 15 Sep 2013 10:51 AM |
| Light is the name of the part |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 10:51 AM |
| Highly doubt you know how to script. What you requested is easier then the script you posted. |
|
|
| Report Abuse |
|
|
Hppolice
|
  |
| Joined: 06 Feb 2012 |
| Total Posts: 578 |
|
| |
|
Hppolice
|
  |
| Joined: 06 Feb 2012 |
| Total Posts: 578 |
|
|
| 15 Sep 2013 10:52 AM |
| Yeah, I'm not too good, meh brain thinks one thing, i bet it could be easier... |
|
|
| Report Abuse |
|
|
Hppolice
|
  |
| Joined: 06 Feb 2012 |
| Total Posts: 578 |
|
|
| 15 Sep 2013 10:53 AM |
| Willing to pay 20 robux for someone to help |
|
|
| Report Abuse |
|
|
mic144
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 1598 |
|
|
| 15 Sep 2013 10:57 AM |
FIrst you: http://wiki.roblox.com/index.php/User:Quenty/How_To_Receive_Help_From_Scripters
Then you: Repost
Then we: Help.
If it's properly posted. |
|
|
| Report Abuse |
|
|
Hppolice
|
  |
| Joined: 06 Feb 2012 |
| Total Posts: 578 |
|
|
| 15 Sep 2013 10:58 AM |
| ^ he posts that to everyone .-. |
|
|
| Report Abuse |
|
|
mic144
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 1598 |
|
|
| 15 Sep 2013 11:00 AM |
@Hppolice
People need to learn how to ask for help. If you don't do it how the wiki says then helpers won't be able to help.
|
|
|
| Report Abuse |
|
|