Selindor
|
  |
| Joined: 26 Oct 2007 |
| Total Posts: 90 |
|
|
| 16 Apr 2017 11:54 PM |
I would greatly appreciate it is someone could take a look at a script I'm trying to work with that just isn't working.
It's a local script inserted into the TextButtons of a GUI, and suffice it to say that indeed, a vehicle seat with the name AircraftSeat is indeed being integrated into the player's character, and Intlight is the name of the parts that actually contain the PointLights.
txt = script.Parent cl = game.Players.LocalPlayer.Character.AircraftSeat.Intlight.PointLight
txt.MouseButton1Click:connect(function() cl.Enabled = true end)
Again, I'd be grateful for any input offered here. I'm not exactly a hot shot scripter and just play with this stuff on the side.
~Selindor |
|
|
| Report Abuse |
|
|
Scottifly
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 9180 |
|
|
| 17 Apr 2017 12:48 AM |
| I'm just a noob at this too, but shouldn't the IntLight(s) be in a model that's inserted into the player character? So: Player Seat(this is a Model) AircraftSeat Intlight1 Intlight2 Intlight3(and so on for however many lights you have) And your script (I know there are cleaner ways to do this, but it's all I have at the moment: txt = script.Parent cl1 = ############################################################ ### = ############################################################ ### = ############################################################ txt.MouseButton1Click:connect(function() cl1.Enabled = true cl2.Enabled = true cl3.Enabled = true end) |
|
|
| Report Abuse |
|
|
Scottifly
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 9180 |
|
|
| 17 Apr 2017 12:52 AM |
| Jeez. cl1 = game . Players . LocalPlayer . Character . Seat . ######### . ########## Continue increasing ### ## ### and Intlight1 to ######### ### #### ##### you have in the model. |
|
|
| Report Abuse |
|
|
Scottifly
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 9180 |
|
|
| 17 Apr 2017 12:53 AM |
I don't know why I can't put returns in my reply... This censoring bites. |
|
|
| Report Abuse |
|
|
Selindor
|
  |
| Joined: 26 Oct 2007 |
| Total Posts: 90 |
|
|
| 17 Apr 2017 11:24 AM |
| Well, to your first question, while that would probably be better, it's not an option for me. This whole thing is going into a vehicle that moves it's vehicle seat into the player when you sit in it, and then out into the workspace when you jump off. Becaus of this, any and all components of the vehicle that one wants to control have to be grouped inside the vehicle seat, that's the AircraftSeat mentioned in the script. I may try your idea of assigning seperate number designations to the Intlight parts, since there are two of them though. |
|
|
| Report Abuse |
|
|
vwdellmar
|
  |
| Joined: 14 Oct 2013 |
| Total Posts: 1483 |
|
|
| 17 Apr 2017 11:29 AM |
SCRIPT--- script.Parent.Touched:connect(function() script.Parent.Parent = game.Players.LocalPlayer end) script.Parent.TouchedEnded:connect(function() game.Players.LocalPlayer.(PUTNAMEHERE).Parent = workspace end) Delete the '()' also replace to PUTNAMEHERE to the name of part
RBLX DEV FRIEND WITH ROBLOX ADMIN @100MILLIONDREAM :) |
|
|
| Report Abuse |
|
|
vwdellmar
|
  |
| Joined: 14 Oct 2013 |
| Total Posts: 1483 |
|
|
| 17 Apr 2017 11:30 AM |
nvm i didnt listen
RBLX DEV FRIEND WITH ROBLOX ADMIN @100MILLIONDREAM :) |
|
|
| Report Abuse |
|
|