I'm trying to change the default actual gui for a tool to a custom one, but not the TextureID. For example if anyone's ever played royal high, they have a custom gui for every tool. and I was wondering if anyone knows how to do it. Right now Im trying to make whenever a tool is added to a players backpack, it creates a gui but Im not enitirely sure how to make it so when a second or third tool is added, it the gui before it moves over a bit. Here is my script so far.
local plr = game.Players.LocalPlayer local char = plr:WaitForChild("Character") local backpack = plr:WaitForChild("Backpack") local childadded = backpack.ChildAdded local count = 1
childadded:Connect(function() local new = Instance.new("ScreenGui") new.Parent = game.StarterGui local newbutton = Instance.new("ImageButton") newbutton.Parent = new newbutton.BackgroundTransparency = 1 newbutton.Image = "rbxgameasset://Images/LogoMakr_3FpbQA" newbutton.Size = UDim2.new(0,80,0,80) end)
This is created by completely disabling the backpack via
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
From there, you'd create a format for your hotbar, and then cloning it and checking events for when a player equips, unequips, or when a child is removed from the player's hotbar accordingly.
local plr = game.Players.LocalPlayer local char = plr:WaitForChild("Character") local backpack = plr:WaitForChild("Backpack") local childadded = backpack.ChildAdded local count = 1 childadded:Connect(function() local new = Instance.new("ScreenGui") new.Parent = game.StarterGui local newbutton = Instance.new("ImageButton") newbutton.Parent = new newbutton.BackgroundTransparency = 1 newbutton.Image = "rbxgameasset://Images/LogoMakr_3FpbQA" newbutton.Size = UDim2.new(0,80,0,80) end)