opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
|
| 01 Feb 2014 10:55 AM |
Since you can't place scripts in Local parts I can't detect when this local part has been hit by the player it belongs to.
Is there a way to access this local part to find out when it is hit?
"Another thing to note is that scripts, local or not, will not run inside the camera. If a local part is to be scripted, the script controlling it must reside elsewhere." - Wiki
|
|
|
| Report Abuse |
|
|
shawnyg
|
  |
| Joined: 21 Apr 2011 |
| Total Posts: 1428 |
|
|
| 01 Feb 2014 10:58 AM |
game.Workspace.Part.Touched:connect(function(hit) if hit.Parent:findFirstChild("Humanoid") then plr = game.Players:GetPlayerFromCharacter(hit.Parent) print(plr.Name.." has touched the local part!") end end) ~Hope I helped, if you need a script, PM me. ~The G~ ~CAT General Shawnyg~ |
|
|
| Report Abuse |
|
|
opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
|
| 01 Feb 2014 11:00 AM |
| I'm not that stupid. You've read what I said wrong, in fact you haven't read it at all. |
|
|
| Report Abuse |
|
|
shawnyg
|
  |
| Joined: 21 Apr 2011 |
| Total Posts: 1428 |
|
|
| 01 Feb 2014 11:01 AM |
Gee, not even a "thanks for trying"... http://wiki.roblox.com/index.php?title=Time#time
~Hope I helped, if you need a script, PM me.~ ~The G~ ~CAT General Shawnyg~ |
|
|
| Report Abuse |
|
|
opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
|
| 01 Feb 2014 11:04 AM |
| Thanks for trying, I'm just annoyed hundreds of lines of code are being halted by this one issue. I don't see how a link to a time function is going to solve it. |
|
|
| Report Abuse |
|
|
|
| 01 Feb 2014 11:43 AM |
| can you run a local script in the local part? |
|
|
| Report Abuse |
|
|
jakedies
|
  |
| Joined: 19 Oct 2008 |
| Total Posts: 86 |
|
|
| 01 Feb 2014 12:27 PM |
Try this in a local script in like, PlayerGui.
Game.Workspace.CurrentCamera:WaitForChild("Part")P:Touched:connect(...) |
|
|
| Report Abuse |
|
|
opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
|
| 01 Feb 2014 02:12 PM |
So put its location in the connection line? Ill try it. |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 01 Feb 2014 02:20 PM |
Doesn't matter.
part = game.Workspace:WaitForChild("CurrentCamera")
part.Touched:connect(function()) |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 01 Feb 2014 02:21 PM |
forgot to define the part
part = game.Workspace:WaitForChild("CurrentCamera")["Part"]
part.Touched:connect(function()) |
|
|
| Report Abuse |
|
|
jakedies
|
  |
| Joined: 19 Oct 2008 |
| Total Posts: 86 |
|
|
| 01 Feb 2014 02:50 PM |
| lolb, that's not going to work, at all |
|
|
| Report Abuse |
|
|