jetlogan
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1423 |
|
|
| 21 Jul 2013 11:14 PM |
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) print(player.Name.." has joined the server!") repeat wait() until player.PlayerGui script.Parent.Parent.ForPlayers.Menu:Clone().Parent = player.PlayerGui script.Parent.Parent.ForPlayers.MenuScript:Clone().Parent = player.PlayerGui characterChild = character:GetChildren() for times=1,#characterChild do if characterChild[times]:IsA("Part") then characterChild[times].BrickColor = BrickColor.new(137) end end end) end)
Says PlayerGui isn't a member of player. |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2013 11:18 PM |
Roblox cannot do ANYTHING right,..
Add
repeat wait until player:findFirstChild"PlayerGui"
It's not posting! Stupid Internet! |
|
|
| Report Abuse |
|
|
jetlogan
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1423 |
|
| |
|
|
| 21 Jul 2013 11:28 PM |
| You replaced your current repeat loop with it? |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2013 11:36 PM |
Do:
player:WaitForChild("PlayerGui")
I heard using repeat will continue infinitely if the condition's already true, or something like that. And the loop will occur everytime time the character spawns. Plus, it's a built-in function. |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2013 11:39 PM |
| I never found that issue... |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2013 11:39 PM |
| I don't know, it was something like that, apparently a moderator said it, though I can't confirm it. |
|
|
| Report Abuse |
|
|
jetlogan
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1423 |
|
| |
|
ember1465
|
  |
| Joined: 09 Apr 2009 |
| Total Posts: 398 |
|
|
| 22 Jul 2013 12:13 AM |
Let me just do some stuff here:
local Players = game.Players; local forPlayers = script.Parent.Parent.ForPlayers;
Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) print(player.Name .. " has joined the server!"); repeat wait() until player:FindFirstChild("PlayerGui"); -- OR player:WaitForChild("PlayerGui");
forPlayers.Menu:Clone().Parent = player.PlayerGui; forPlayers.MenuScript:Clone().Parent = player.PlayerGui;
for _, object in next, (character:GetChildren()) do if (object:IsA("Part")) then object.BrickColor = BrickColor.new(127); end end end) end)
It's the same thing, just looks nicer and works.
~ Rainbow Dash is best pony ~ |
|
|
| Report Abuse |
|
|