TapTap

Games worth discovering

iconicon
Roblox
icon
Roblox UI template script

Roblox UI template script

32 View2025-03-03
local chat = script.Parent.Parent:WaitForChild("Chat")
task.wait(0.5) -- wait for TopbarInset to get its values for your player's device
if chat then
if chat:FindFirstChild("Frame") then
if chat.Frame:FindFirstChild("ImageButton") then
script.Parent.TopbarIcon.Size = chat.Frame.ImageButton.Size
if game.GuiService.TopbarInset.Height > 45 then -- the new roblox ui uses Height == 58
print("Using new roblox icon ui!")
game.GuiService:GetPropertyChangedSignal("TopbarInset"):Connect(function() -- animate when it expands
local inset = game.GuiService.TopbarInset
script.Parent.TopbarIcon.Position = UDim2.new(0, inset.Min.X+5, 0, inset.Max.Y-script.Parent.TopbarIcon.Size.Y.Offset-3)
end)
local inset = game.GuiService.TopbarInset
script.Parent.TopbarIcon.Position = UDim2.new(0, inset.Min.X+5, 0, inset.Max.Y-script.Parent.TopbarIcon.Size.Y.Offset-3)
else -- using old roblox ui
print("Using old roblox icon ui!")
script.Parent.IgnoreGuiInset = false
script.Parent.TopbarIcon.Position = UDim2.new(0,103,0,-33)
script.Parent.TopbarIcon.Size = UDim2.new(0,31,0,32)
script.Parent.TopbarIcon.IconButton.UICorner.CornerRadius = UDim.new(0.25,0)
script.Parent.TopbarIcon.IconButton.ImageTransparency = 0.5
end
end
end
end
Mentioned games
Comments
Lukesales836@gmail.com

❤️

2025-03-06

Author liked
Discover more discussions on TapTap
iconView desktop site

TapTap looks better

on the app love-tato

Open with TapTap