|
| 25 Jun 2014 10:29 AM |
| What are some substitutions for LocalPlayer that works? |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
| |
|
|
| 25 Jun 2014 11:34 AM |
Above, and:
script.Parent.Parent.Parent... etc. |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2014 10:38 PM |
| I mean after they spawn. I should be more specific. |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2014 10:39 PM |
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(steve) print("The player of this guy is " .. p.Name) end) end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Jun 2014 11:18 PM |
| Yeah man. Gotta give us some context. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 07:58 AM |
| Ok so I need a substitution for local player for more than one reason, I run into the issue when I use it to start a gui onTouch and I also run into the issue when I want to get the humans location so an aircraft holding vehicles can fly up forward then down to the npc's locaton with bodyposition and bodygyro. But for the gui insert script I also run into the problem that CameraSubject only works in test mode since the gui goes along with a cutscene. |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 26 Jun 2014 08:08 AM |
| Camera Subject is local only... |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 10:02 AM |
As far as I know, the only way to get a player's camera is from a LocalScript. Just check for a collision with the GUI block from a LocalScript, and check for the part's name to see if it was the correct brick, then do what you want with the camera.
As for the other things, we've already told you how to do them. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 11:40 AM |
| I know it's local only but it still doesent work. Idk why qq. |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Jun 2014 04:05 PM |
| LocalPlayer still doesent work. In-Game, localscript or not. |
|
|
| Report Abuse |
|
|
GearMechs
|
  |
| Joined: 01 Dec 2010 |
| Total Posts: 1220 |
|
|
| 26 Jun 2014 04:23 PM |
| If you can get the data from a StringValue and a script inside the player, then use a script inside the player to copy the stringvalue to the Game. |
|
|
| Report Abuse |
|
|
GearMechs
|
  |
| Joined: 01 Dec 2010 |
| Total Posts: 1220 |
|
|
| 26 Jun 2014 04:26 PM |
For Instance: this goes in the player
Camera = Instance.new('StringValue', script.Parent) Camera.Value = script.Parent.Camera.CameraSubject
String = Camera:Clone() String.Parent = (Insert where you need the data here) |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Jun 2014 09:40 PM |
Oh wait. I would need to get the character for that, and localplayer only works in test mode. OH! I have an idea. I'll get the parent on the onTouch(hit) to go inside the character. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 09:52 PM |
Df?!!? Something went wrong. I know something went wrong when it kills me .-. In "Part" in Workspace there is a Script with this code: function onTouched(hit) if hit.Parent.Humanoid ~= nil then hit.Parent = Character script.CameraScript.Disabled = false g = script.CameraScript:clone() g.Parent = Character end end script.Parent.Touched:connect(onTouched) Then in the Script in the Part there is a another script named "Camera Script" that has this code: Camera = Instance.new('StringValue', script.Parent) Camera.Value = script.Parent.Camera.CameraSubject String = Camera:Clone() String.Parent = Character --I didnt think I needed to put a function in this one so why does this kill me?
|
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 09:53 PM |
| Oh wait! I disabled it too early. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 09:54 PM |
| I mean enabled, and hopefully this works. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 09:57 PM |
| Didnt work. A little help? |
|
|
| Report Abuse |
|
|