im trying to script something that changes the textlabel text and frame size when the player is in the mentioned group, but it doesn’t seem to do it
local Group = 00000000
local textlabel = script.Parent
local Frame = script.Parent.Parent.Frame
game.Players.PlayerAdded:Connect(function(plr)
if plr:IsInGroup(Group) then
textlabel.Text = "1/1"
Frame.Size = UDim2.new(1.01, 0, 0,1, 0)
end
end)
local Group = 000000
local textlabel = script.Parent
local Frame = script.Parent.Parent.Frame
local function OnPlayerAdded(player)
if player:IsInGroup(Group) then
textlabel.Text = "1/1"
Frame.Size = UDim2.new(1.01, 0, 0,1, 0)
end
OnPlayerAdded(game.Players.LocalPlayer)
game.Players.PlayerAdded:Connect(OnPlayerAdded)
end
this does not seem to update either, perhaps could it be because IsInGroup does not detect in studio? since ive only tested it on studio and not game yet
local Group = 00000000
local textlabel = script.Parent
local Frame = script.Parent.Parent.Frame
local function OnPlayerAdded(player)
if plr:IsInGroup(Group) then
textlabel.Text = "1/1"
Frame.Size = UDim2.new(1.01, 0, 0, 1, 0)
end
end
OnPlayerAdded(game.Players.LocalPlayer)
game.Players.PlayerAdded:Connect(OnPlayerAdded)