88GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1465 |
|
|
| 31 Mar 2015 12:37 PM |
B1.MouseButton1Click:connect(function() if E.Value > 69 then if t == 0 then t = 1 E.Value = E.Value - 70 for index,player in pairs(game.Players:GetPlayers()) do if player ~= game.Players.LocalPlayer then if (player.Character.Torso.Position-game.Players.LocalPlayer.Character.Torso.Position).magnitude < 25 then local blind = game.ReplicatedStorage.GUIs.Blind:Clone() blind.Parent = player.PlayerGui end end end wait(.2) t = 0 end end end)
Line 15 errors. 'PlayerGui is not a valid member of Player' I really don't get it. If I used WaitForChild it might never load and the script would break/load forever. |
|
|
| Report Abuse |
|
|
88GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1465 |
|
|
| 31 Mar 2015 12:42 PM |
| Bahmp. Any suspicious lines? |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2015 12:43 PM |
Player:WaitForChild("PlayerGui")
It will load. The PlayerGui will always exist on the client. |
|
|
| Report Abuse |
|
|
88GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1465 |
|
|
| 31 Mar 2015 12:52 PM |
Like I said, I put that it, it doesn't error, it bugs. The requested resource never loads. Can PlayerGui's not be accessed from LocalScripts or something? ROBLOX is acting up again..!
It 'works' the first time, meaning it removes 70 energy, but I doubt it blinds any nearby players. It never works again. Like I said, 'PlayerGui' is not a valid member of 'Player'
What the heck is wrong with ROBLOX...
Bump |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2015 12:55 PM |
You can either use WaitForChild(), which does exist for every player.. But may not be visible on another client with FE (I'm not sure about this).
You could also use a RemoteEvent, and fire the player reference over to the server, after you've done the magnitude check. |
|
|
| Report Abuse |
|
|
88GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1465 |
|
|
| 31 Mar 2015 12:56 PM |
Ugh. I always have to do it the hard way.
But interestingly enough, why is this happening?
Roblox bugging up again? |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2015 12:57 PM |
It's nothing to do with ROBLOX.
If you have FE enabled, it may be exactly what I said. |
|
|
| Report Abuse |
|
|
88GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1465 |
|
|
| 31 Mar 2015 01:00 PM |
e.e
I don't have FilteringEnabled on. Heck, I don't even know what it does.
Explain what happened when PlaceRebuilder said ROBLOX broke his new update? They could be toying around with this. |
|
|
| Report Abuse |
|
|
88GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1465 |
|
|
| 31 Mar 2015 01:05 PM |
| Hey, uh, I'm issues getting some one to join me in my game to diagnose the problem and see if what I did fixed it. Any of you scripters mind following me for a quick sec? I appreciate it. |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2015 01:10 PM |
lol about to ask about FE and then just saw that u said it's not On XD anyway... just do
if player.PlayerGui then end
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|
EgoMoose
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 2896 |
|
|
| 31 Mar 2015 01:10 PM |
You can't access other client's PlayerGui from a different client.
You'll need to access it from with a server script (or something along those lines, remote function, remote event). |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2015 01:10 PM |
He probably decided to use PlayerScripts.
FilteringEnabled prevents Client-Server/Vice-versa communication. You can only do it with RemoteEvents/Functions. http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial
It's primarily used to prevent a few exploits, such as destroying parts in your game, and changing the colour.
|
|
|
| Report Abuse |
|
|
|
| 31 Mar 2015 01:11 PM |
@Kap, You should really starting checking, what you said would error.
if player:FindFirstChild("PlayerGui") then* |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2015 01:12 PM |
lol XD in hurry today :/
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|
88GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1465 |
|
|
| 31 Mar 2015 01:12 PM |
No, I didn't use PlayerScripts.
I didn't know about the Client thing, thanks. I'm trying to use RemoteEvents.
If some one could follow me for 1 minute to see if it works, I'd be grateful.
But thanks for all the help guys. |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2015 01:14 PM |
am coming! XD
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 31 Mar 2015 01:16 PM |
PlayerGui is regenerated upon spawn. If you're referencing it post death in a script that hasn't been disabled and re-enabled/you don't redefine PlayerGui and all of it's descendants variables, it will cease to work without error. I'm not sure if that's your problem, just giving some information.
-=Robo=- |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 31 Mar 2015 01:17 PM |
If it's not regenerating, I don't know what to tell you. Try putting some prints to see if it's continuing execution.
-=Robo=- |
|
|
| Report Abuse |
|
|
88GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1465 |
|
|
| 31 Mar 2015 01:18 PM |
Using RemoteEvents worked.
Thanks for the help guys, and testers c: |
|
|
| Report Abuse |
|
|