Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why doesn't the GUI get in PlayerGui, but prints it is in?

ServerScript in ServerScriptService:

function givetools(player)
	if #game.ServerStorage.TeamTools:FindFirstChild(player.Team.Name):GetChildren() ~= 0 then
		for itools, tools in pairs(game.ServerStorage.TeamTools:FindFirstChild(player.Team.Name):GetChildren()) do
			local clone = tools:Clone()
			clone.Parent = player.Backpack
		end
	end
end

function givegui(player)
	if #game.ServerStorage.TeamGuis:FindFirstChild(player.Team.Name):GetChildren() ~= 0 then
		for igui, gui in pairs(game.ServerStorage.TeamGuis:FindFirstChild(player.Team.Name):GetChildren()) do
			local clone = gui:Clone()
			print(clone)
			clone.Parent = player.PlayerGui
			print(clone.Parent)
		end
	end
end


game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function()
		if player.TeamColor ~= BrickColor.new("Ghost grey") and player.TeamColor ~= BrickColor.new("Medium stone grey") then
			print(#game.ServerStorage.TeamTools:FindFirstChild(player.Team.Name):GetChildren())
			givegui(player)
			givetools(player)
		end
	end)
end)

Prints: http://prntscr.com/ryjded

but nothing found in PlayerGui or seen on your screen.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.