How to make an overhead text label visible for players in certain group [ SOLVED ]

How to make an overhead text label visible if the player is in a specific groups
I’m currently making an Army-type game, and I’m trying to have a future for players that are in secret groups. I added an invisible VIP Tag, and I’m trying to make it so its goes visible if the player is in a special group. I’m not the best at scripting everyone that I tried failed. Does anyone know how to make this work?

image

the text label called VIP is the invisible lable witch I want to only be visible for members in specific groups

I have tried to do something like,

local VIP = script.Parent.Frame.VIP

if plr.IsInGroup(7840509) then
	VIP.Visible = true

end)

Im a starter sctripter I’m not sure what to do

1 Like

Try using

local VIP = script.Parent.Frame.VIP

if plr:IsInGroup(7840509) then
	VIP.Visible = true

end
1 Like

Still, the same It did not work.

1 Like
local VIP = script.Parent.Frame.VIP

game:GetService("Players").PlayerAdded:Connect(function(Player)
	if Player:IsInGroup(7840509) then
		VIP.Visible = true
	end
end)

sorry im on phone rn

2 Likes

It did not work, but it seems that there is an error line at the end by “end)”

1 Like

use the new formatted one i edited

1 Like

It works now thank you for the help

you’re welcome!

characterlimits

2 Likes