I am making an armory system and trying to make it so when the menu is visible the blureffect is enabled but its not working. Code:
local Back = script.Parent.Parent.Parent.BG
local ListItems = script.Parent:WaitForChild("ItemList")
local SellList = script.Parent:WaitForChild("SellList")
local Blur = Instance.new("BlurEffect",Back)
--// Buttons
local Heals = script.Parent:WaitForChild("Healables")
local Armour = script.Parent:WaitForChild("Armour")
local Melees = script.Parent:WaitForChild("Melees")
local Guns = script.Parent:WaitForChild("Guns")
local Purchase = script.Parent:WaitForChild("Purchase")
local Sell = script.Parent:WaitForChild("Sell")
--// Frames
local HealsFrame = ListItems.HealableScroll
local ArmourFrame = ListItems.ArmourScroll
local MeleesFrame = ListItems.MeleeScroll
local GunsFrame = ListItems.GunsScroll
--// Functions
Purchase.MouseButton1Click:Connect(function()
Purchase.BorderSizePixel = "2"
Purchase.BackgroundColor3 = Color3.fromRGB(103, 103, 103)
Sell.BorderSizePixel = "0"
Sell.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
ListItems.Visible = true
SellList.Visible = false
end)
Sell.MouseButton1Click:Connect(function()
Sell.BorderSizePixel = "2"
Sell.BackgroundColor3 = Color3.fromRGB(103, 103, 103)
Purchase.BorderSizePixel = "0"
Purchase.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
ListItems.Visible = false
SellList.Visible = true
end)
Heals.MouseButton1Click:Connect(function()
Heals.BorderSizePixel = "2"
Heals.BackgroundColor3 = Color3.fromRGB(103, 103, 103)
Armour.BorderSizePixel = "0"
Armour.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
Melees.BorderSizePixel = "0"
Melees.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
Guns.BorderSizePixel = "0"
Guns.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
HealsFrame.Visible = true
ArmourFrame.Visible = false
MeleesFrame.Visible = false
GunsFrame.Visible = false
end)
Armour.MouseButton1Click:Connect(function()
Heals.BorderSizePixel = "0"
Heals.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
Armour.BorderSizePixel = "2"
Armour.BackgroundColor3 = Color3.fromRGB(103, 103, 103)
Melees.BorderSizePixel = "0"
Melees.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
Guns.BorderSizePixel = "0"
Guns.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
HealsFrame.Visible = false
ArmourFrame.Visible = true
MeleesFrame.Visible = false
GunsFrame.Visible = false
end)
Melees.MouseButton1Click:Connect(function()
Heals.BorderSizePixel = "0"
Heals.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
Armour.BorderSizePixel = "0"
Armour.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
Melees.BorderSizePixel = "2"
Melees.BackgroundColor3 = Color3.fromRGB(103, 103, 103)
Guns.BorderSizePixel = "0"
Guns.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
HealsFrame.Visible = false
ArmourFrame.Visible = false
MeleesFrame.Visible =true
GunsFrame.Visible = false
end)
Guns.MouseButton1Click:Connect(function()
Heals.BorderSizePixel = "0"
Heals.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
Armour.BorderSizePixel = "0"
Armour.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
Melees.BorderSizePixel = "0"
Melees.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
Guns.BorderSizePixel = "2"
Guns.BackgroundColor3 = Color3.fromRGB(103, 103, 103)
HealsFrame.Visible = false
ArmourFrame.Visible = false
MeleesFrame.Visible = false
GunsFrame.Visible = true
end)