|
| 27 Apr 2013 01:05 PM |
| Would I use a local script in the player's camera, would I use a regular script, or will no scripts run at all in the camera? |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2013 01:08 PM |
| I put my LocalScript in the StarterGui. |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2013 01:40 PM |
| I'm asking which type of script runs in the player's camera. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
| |
|
|
| 27 Apr 2013 08:15 PM |
| Is the .Touched event allowed to run in the camera? I have a part in the camera that has a localscript in it that puts a message in the workspace whenever the player touches it. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 Apr 2013 03:04 AM |
| What exactly are you trying to do here? I can help. |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2013 06:04 PM |
| Basically, an invisible wall preventing you from leaving an area pops up on your screen only when you walk into it. For simplicity, I thought I'd parent the localscript to the wall in the camera. So far, it hasn't worked at all. |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
|
| 28 Apr 2013 06:09 PM |
| He's making LocalPart(s). You need a LocalScript, for sure. The .Touched script will have to be inserted into the parts themselves. |
|
|
| Report Abuse |
|
|
|
| 28 Apr 2013 07:37 PM |
| It is, and it still isn't working. I added "game.Players.LocalPlayer.Character.Humanoid.Health = 50" to check to make sure the script was even running, and it didn't. So It seems like the localscript isn't even able to run. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 29 Apr 2013 01:32 AM |
Never heard of LocalParts.
Can't you just make an invisible brick and make its transparency 1 when one touches it? |
|
|
| Report Abuse |
|
|
As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 29 Apr 2013 04:54 AM |
NO scripts can run in the Camera.
Just to make sure you don't make the same fail, as I did half a year ago.
- As, half a year ago... yes, half a year ago... |
|
|
| Report Abuse |
|
|
juriaan
|
  |
| Joined: 25 Nov 2008 |
| Total Posts: 939 |
|
|
| 29 Apr 2013 05:43 AM |
Scripts are not allowed in the Camera Object.
Personally I will put the part in the Camera object and the script in StarterGui.
|
|
|
| Report Abuse |
|
|
breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
|
| 29 Apr 2013 06:32 AM |
Just set transparency to 1, that is far easier.
Another funny thing: If you have AIs (like Zombies) and you put bricks into CurrentCamera with a non-local script, players will fall through those parts, but AIs like Zombies will not. One could use that as a player-only door, preventing zombies from entering the spawn area. |
|
|
| Report Abuse |
|
|
|
| 03 May 2013 06:51 PM |
I ended up putting the script in the backpack.
Also, it must be in the camera for little scripting tricks that most of you can't understand :) |
|
|
| Report Abuse |
|
|