Im trying do buff and debuffs
but making billboars its huge problem for me
my script
local function CreateGui(target,name,duration)
coroutine.wrap(function()
if connection == nil then
connection = target.Head.ChildRemoved:Connect(function(removed)
if CollectionService:HasTag(removed,"Effect") then
for i,v in pairs(target.Head:GetChildren()) do
if v ~= nil and v:IsA("BillboardGui") and CollectionService:HasTag(v,"Effect") == true then
v.StudsOffset = v.StudsOffset - Vector3.new(i,0,0)
end
end
end
end)
end
local CurrentEffects = -1
local Gui = script:FindFirstChild(name):Clone()
Gui.Parent = target.Head
for i,v in pairs(target.Head:GetChildren()) do
if v ~= nil and v:IsA("BillboardGui") and CollectionService:HasTag(v,"Effect") == true then
v.StudsOffset = v.StudsOffset - Vector3.new(1,0,0)
CurrentEffects = CurrentEffects + 1
end
end
Gui.StudsOffset = Vector3.new(CurrentEffects,2.3,0)
wait(duration)
Gui:Destroy()
end)()
end
Its like the UiListLayout, but it also does grids, like his name says. You can put the separation in the CellPadding, and then you just have to remove the hearts.
How it works basically is you put the UIGridLayout under the Object that the other objects are going to be sorted in. The UIGridLayout will handle the constraints of the sizes and positions and layout etc… by its properties. So yours should look something like this