generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Club Houses » Clans & Guilds
Home Search
 

Re: 13:18:03.718 - ScreenGui is not a valid member of PlayerGui

Previous Thread :: Next Thread 
ywisis is not online. ywisis
Joined: 07 Dec 2014
Total Posts: 1481
12 Mar 2017 08:19 AM
???? It is a member of PlayerGui though.


Can anyone tell me how to fix?


for i, v in pairs(game.Players:GetChildren()) do
if player.TeamColor == BrickColor.new("Electric blue") then
num1 = num1 + v.leaderstats.kills.Value
player.PlayerGui.ScreenGui.blue.Text = num1
num1 = 0
end
end
Report Abuse
ywisis is not online. ywisis
Joined: 07 Dec 2014
Total Posts: 1481
12 Mar 2017 08:46 AM
b
Report Abuse
Seviro is not online. Seviro
Joined: 08 Dec 2009
Total Posts: 46758
12 Mar 2017 08:51 AM
What is the script a child of and is it a LocalScript


r+://290109653
Report Abuse
F_lipe is not online. F_lipe
Joined: 25 Apr 2015
Total Posts: 5917
12 Mar 2017 08:54 AM
Seviro Brenan


Report Abuse
ywisis is not online. ywisis
Joined: 07 Dec 2014
Total Posts: 1481
12 Mar 2017 08:57 AM
it's not a localscript and its a child of ServerScriptService
Report Abuse
Seviro is not online. Seviro
Joined: 08 Dec 2009
Total Posts: 46758
12 Mar 2017 09:03 AM
local player = game.Players.LocalPlayer
local playergui = script.Parent.Parent
local electricBlue = BrickColor.new("Electric blue")
local textUI = script.Parent.blue
local textLabel = textUI.Text

for i, v in pairs(game.Players:GetChildren()) do
if player.TeamColor == electricBlue then
num1 = num1 + v.leaderstats.kills.Value
playergui.ScreenGui.blue.Text = num1
num1 = 0
end
end

put that in a LocalScript as a child of your UI "ScreenGui" i'm assuming and it should work


r+://290109653
Report Abuse
Seviro is not online. Seviro
Joined: 08 Dec 2009
Total Posts: 46758
12 Mar 2017 09:03 AM
local playergui = script.Parent.Parent
local electricBlue = BrickColor.new("Electric blue")
local textUI = script.Parent.blue
local textLabel = textUI.Text

for i, v in pairs(game.Players:GetChildren()) do
if player.TeamColor == electricBlue then
num1 = num1 + v.leaderstats.kills.Value
textLabel = num1
num1 = 0
end
end

correction


r+://290109653
Report Abuse
Seviro is not online. Seviro
Joined: 08 Dec 2009
Total Posts: 46758
12 Mar 2017 09:06 AM
if that doesn't work all you need to do is create a function "player" that is:

local player = game.Players.LocalPlayer

and then you should find PlayerGui properly


r+://290109653
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Clans & Guilds
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image