sebsa
|
  |
| Joined: 17 Oct 2008 |
| Total Posts: 2771 |
|
|
| 26 Jan 2015 04:03 PM |
Can someone please tell me what the problem in this script is? I'm literally getting frustrated over this.
-- This is in a local script.
local Player = game.Players.LocalPlayer local Character = Player.Character local Mouse = Player:GetMouse () local GUI_Folder = game:WaitForChild ("GraphicalUserInterfaces") -- I added a Configuration instance for this one local SpecGui = GUI_Folder:FindFirstChild ("SpectatingGUI") local PlayerGui = Player:FindFirstChild ("PlayerGui") local PlayerName = Character.Name Mouse.KeyDown:connect (function(Key)
if Key == "e" and PlayerGui then
if PlayerGui:FindFirstChild ("SpectatingGUI") then
PlayerGui:FindFirstChild ("SpectatingGUI"):remove ()
else if Key == "e" and PlayerGui then
if PlayerGui:FindFirstChild ("SpectatingGUI") == nil then
local Gui =SpecGui:clone ()
Gui.Parent = PlayerGui Gui:FindFirstChild ("Bottom-Frame"):FindFirstChild ("PlayerName").Text = PlayerName Gui:FindFirstChild ("Bottom-Frame"):FindFirstChild ("PlayerNameShadow").Text = PlayerName
end end end end end) |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2015 04:14 PM |
What is a "Play Server"? I think you mean solo mode/testing server. |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2015 04:14 PM |
| You need to wait for their character to load. |
|
|
| Report Abuse |
|
|
compy111
|
  |
| Joined: 02 Apr 2009 |
| Total Posts: 583 |
|
|
| 26 Jan 2015 04:15 PM |
I'm not sure but I have a feeling it will be this line.
local GUI_Folder = game:WaitForChild ("GraphicalUserInterfaces")
I honestly havent ever heard of GraphicalUserInterfaces. I think you should place your GUI in ServerStorage. ServerStorage is always loaded before a player joins the game. It also provides a decent security to prevent hackers from copying your place :-) |
|
|
| Report Abuse |
|
|