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

Group Item Not Loading For Some Players?

Players have been giving reports on bugs like their omega drink (group item). They've said that it doesn't show up in their inventory once they rejoin the game after joining the group. And for some players, they've told me that it's in their inventory. I'd just like an explanation and solution as to why it doesn't load for some players.

local item = game.ReplicatedStorage.Items:FindFirstChild("omega energy drink")
game.Players.PlayerAdded:Connect(function(plr)
	if plr:IsInGroup(4292399) then
		local bag = plr:WaitForChild("Backpack")
		item:Clone().Parent = bag
		item:Clone().Parent = plr.StarterGear
	end
end)

1 comment

0

Im just guessing here but, have you tried adding a delay before checking the group? Maybe just wait a few seconds.

1 answer

✓ Accepted answer

Not 100% sure, but I think :IsInGroup() doesn’t return up-to-date results. If the player joins the group and immediately joins the game after that, it won’t work as the function still thinks the player isn’t in the group. Maybe give it a few minutes or at most half an hour and it should work.

If you want it to be up-to-date sooner though, I read on the Roblox wiki that using a localscript gives you more up-to-date results.

Hope this helped!

1 comment

0

Thank you, it did.

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