Why doesn't this group Gui clone script work?

	if plr:IsInGroup(8342423) then
		-- If the player IS in the group
		if plr:GetRankInGroup(8342423) > 10 then
			local clone game.ServerStorage.Host:Clone()
			clone.Parent = plr.PlayerGui
		end
     end

The cloned GUI comes back as nil.

By the way, this happens when the player joined, and the player variable is “plr”.

I’m curious why you haven’t used an operator for this. It is missing =. Speaking of which, what script is this? LocalScript?

Aannnd, that is where I messed up. I forgot to put the = there, thank you for pointing that out.

1 Like

You do not need to check if the player is in the group. Just only check their rank.

Why?

Because, in a group that you did not join, your rank is 0, so checking if player is in group is not needed.

This is only a single part of the code, it is 100 lines long, it is needed elsewhere.