Failed to transfer player billBoardGui

Server:

local ServerStorage = game:GetService("ServerStorage")
local statUnder = ServerStorage:WaitForChild("statUnder")

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		
		local uiClone = statUnder:Clone()
		uiClone.Parent = character.Head
		uiClone.Name = "StatUnderClone"
		uiClone.stat.Text = "TEST"
		character.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
		
		print(uiClone.Name)
	end)
end)

Снимок экрана 2023-08-11 в 04.03.08

So here I have a simple script, logically it should work as I just make a copy and throw it to the player’s head. But for some reason when I go to the game and search for a gui with this name I can not find anything. And above the player there is nothing. I checked and for example on the npc when I threw him a gui to the head all shows. but the Player does not. And does not even appear although this is what it says:

StatUnderClone  -  Server - statunder:13

Bottom line is what do you think it could be related to, hope for an answer.

2 Likes

I had this problem before and apparently this is roblox with “MeshPart Heads & Accessories”, the solution that worked for me I leave here

local ServerStorage = game:GetService("ServerStorage")
local statUnder = ServerStorage:WaitForChild("statUnder")

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		
		local Head = character:WaitForChild("Head")
		
		repeat task.wait(0.35) until character:FindFirstChild("Head")
		Head = character.Head
		
		local uiClone = statUnder:Clone()
		uiClone.Parent = Head
		uiClone.Name = "StatUnderClone"
		uiClone.stat.Text = "TEST"
		character.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None

		print(uiClone.Name)
	end)
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.