I wrote a script trying to get the emblem of a group, then using it on a decal.
This is my script
local GroupService = game:GetService("GroupService")
local groupId = script.Parent.GroupId
local function getEmblemAsync(groupId)
local groupInfo = GroupService:GetGroupInfoAsync(groupId)
return groupInfo.EmblemUrl
end
script.Parent.Parent.Parent.Icon.Decal.Texture = getEmblemAsync(script.Parent.GroupId)
I get the error “Unable to cast Instance to int64”
Does anyone notice any errors?