Hello, I ran into an issue with something not being a member of something, even though it is. I already read through the posts which deal with this, with no resolution being found. I also tried using WaitForChild
, which also does not work.
Something funny to point out is, that it works for my friend but not for me.
This is the hierarchy of the supposedly not existing Frame:
and this is the code for it:
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function()
local oh = ServerStorage.Overhead
local overheadClone = oh:Clone()
local regionCode = LocalizationService:GetCountryRegionForPlayerAsync(plr)
overheadClone.Parent = plr.Character.Head
overheadClone.Frame.Value.Text = "Avatar Value: \u{E002} "..getAvatarValue(plr.UserId)
overheadClone.Frame.Location.Text = "Location: "..countryEmojiTable[regionCode].." "..countryTable[regionCode]
-- it errors above this line
end)
end)
1 Like
you do have
local ServerStorage = game:GetService("ServerStorage")
somewhere right?
1 Like
Yeah, all the services are defined above.
1 Like
Can you send a screenshot of the error it throws
1 Like
what do you mean by WaitForChild() doesnt work? Does it say infinite yield possible?
And what is your friend doing differently?
My friend is doing nothing differently, and yes, the thatβs the case with Infinite Yield possible.
can you provide screenshots of your friend
does it throw an error message if you run the code without parenting it to the playerβs head
Nope, it does not.β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
got a hunch its your head. set it to default
im talking about your avatar btw
The default head works, but I still need that script to work for every player, not just for players with the default head, how would I do that?
Re-equip the old head and spawn into the game. Check your character model in the object browser and see if it changed the name of your head.
The solution here would be to force the default head, OR make a table of all possible head items
Nope, name doesnβt change. Itβs Head for both.
are you in team create with your friend?
Yes.β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
try publishing it and see if it works there
Already tried that, sadly didnβt work.
seems to be a roblox bug. The fix here is to force the default head.