Hey there, I’m trying to make a member board, but the text doesn’t seem to update, here’s my code:
local HttpService = game:GetService("HttpService")
local GroupService = game:GetService("GroupService")
local TweenService = game:GetService("TweenService")
local GroupID = 12212248 -- Put the group ID here
local MemberGoal = 350
local function getEmblemAsync(groupId)
local success, groupInfo = pcall(function()
return GroupService:GetGroupInfoAsync(groupId)
end)
return groupInfo.EmblemUrl
end
local function formatNumber(n)
n = tostring(n)
return n:reverse():gsub("%d%d%d", "%1,"):reverse():gsub("^,", "")
end
local groupIcon = getEmblemAsync(GroupID)
if groupIcon then
script.Parent.GroupIcon.Image = groupIcon
end
task.spawn(function()
while true do
local response = HttpService:RequestAsync({
Url = "https://groups.roproxy.com/v1/groups/" .. GroupID,
Method = "GET"
})
if response.Success and response.Body then
local data = HttpService:JSONDecode(response.Body)
local memberCount = data.memberCount
local membersNeeded = MemberGoal - memberCount
local membersNeededString = tostring(membersNeeded)
script.Parent.MemberCount.Counter:GetPropertyChangedSignal("Value"):Connect(function()
script.Parent.MemberCount.Text = string.format("Members: %s", formatNumber(math.floor(script.Parent.MemberCount.Counter.Value)))
script.Parent.Frame.current = "🎉 We're now at " .. string.format("Members: %s", formatNumber(math.floor(script.Parent.MemberCount.Counter.Value))) .. " members in our group! Only " .. membersNeededString .. " to go until " .. MemberGoal .. "!"
end)
local tween = TweenService:Create(script.Parent.MemberCount.Counter, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), { Value = memberCount })
tween:Play()
end
task.wait(60)
end
end)
This may also help…