BorderSizePixel on module is not working

This part of the script is not working. All of the instances are mentioned, but this one property won’t seem to budge:


I have reloaded this script.

local MainFrame = Instance.new("Frame", Holder)
			
MainFrame.BorderSizePixel = 5 -- No errors, but nothing happens here
MainFrame.Visible = true


Yes, Holder is an object:

local Holder = SelectedPlayer.PlayerGui["|-NotificationHolder-|"]

I can confirm that this is a bug when I set it to 999.

I am unable to replicate your issue with the given code. What is the value of BorderSizePixel property when you test it in Studio?

It is set to 1 for some reason

Make sure to check that you aren’t accidentally updating the property and setting it to 1 at a later point in your code. Also, it would be helpful if you posted more of your code as it is impossible to pinpoint any issues with the code you have provided.

for Index, SelectedPlayer in pairs(PlayersInGameTable) do
			local Holder = SelectedPlayer.PlayerGui["|-NotificationHolder-|"]
			
			local MainFrame = Instance.new("Frame", Holder)
			local Title = Instance.new("TextLabel", MainFrame)
			local Desc = Instance.new("TextLabel", MainFrame)
			
			MainFrame.Name = "MainFrame"
			MainFrame.BackgroundColor3 = Color3.new(0.262745, 0.243137, 0.215686)
			MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
			MainFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
			MainFrame.Size = UDim2.new(0.696, 0, 0.687, 0)
			MainFrame.BorderColor3 = Color3.new(0, 0, 0)
			MainFrame.BorderSizePixel = 5
			MainFrame.Visible = true
			
			Title.Name = "Title"
			Title.BackgroundTransparency = 1
			Title.AnchorPoint = Vector2.new(0.5, 0.5)
			Title.Position = UDim2.new(0, 333, 0, 37)
			Title.Size = UDim2.new(0.631, 0, 0.139, 0)
			Title.BorderColor3 = Color3.new(0, 0, 0)
			Title.TextColor3 = Color3.new(0, 0, 0)
			Title.Font = Enum.Font.FredokaOne
			Title.Text = TitleMessage
			Title.TextScaled = true
			Title.Visible = true
			
			Desc.Name = "Desc"
			Desc.BackgroundTransparency = 1
			Desc.AnchorPoint = Vector2.new(0.5, 0.5)
			Desc.Position = UDim2.new(0, 333, 0, 242)
			Desc.Size = UDim2.new(0.985, 0, 791, 0)
			Desc.BorderColor3 = Color3.new(0, 0, 0)
			Desc.TextColor3 = Color3.new(0, 0, 0)
			Desc.Font = Enum.Font.FredokaOne
			Desc.Text = Description
			Desc.TextScaled = true
			Desc.Visible = true
		end

When I update it in the explorer inside of test mode, it updates

I am still unable to reproduce the issue with the code provided. Are you 100% sure you aren’t accidentally changing the BorderSizePixel property back to 1 somewhere else?

1 Like

Oh, found the issue.

else
		local Holder = Player.PlayerGui["|-NotificationHolder-|"]

		local MainFrame = Instance.new("Frame", Holder)
		local Title = Instance.new("TextLabel", MainFrame)
		local Desc = Instance.new("TextLabel", MainFrame)

		MainFrame.Name = "MainFrame"
		MainFrame.BackgroundColor3 = Color3.new(0.262745, 0.243137, 0.215686)
		MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
		MainFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
		MainFrame.Size = UDim2.new(0.696, 0, 0.687, 0)
		MainFrame.BorderColor3 = Color3.new(0, 0, 0)
		MainFrame.Visible = true

		Title.Name = "Title"
		Title.BackgroundTransparency = 1
		Title.AnchorPoint = Vector2.new(0.5, 0.5)
		Title.Position = UDim2.new(0, 333, 0, 37)
		Title.Size = UDim2.new(0.631, 0, 0.139, 0)
		Title.BorderColor3 = Color3.new(0, 0, 0)
		Title.TextColor3 = Color3.new(0, 0, 0)
		Title.Font = Enum.Font.FredokaOne
		Title.Text = TitleMessage
		Title.TextScaled = true
		Title.Visible = true
		
		Desc.Name = "Desc"
		Desc.BackgroundTransparency = 1
		Desc.AnchorPoint = Vector2.new(0.5, 0.5)
		Desc.Position = UDim2.new(0, 333, 0, 242)
		Desc.Size = UDim2.new(0.985, 0, 791, 0)
		Desc.BorderColor3 = Color3.new(0, 0, 0)
		Desc.TextColor3 = Color3.new(0, 0, 0)
		Desc.Font = Enum.Font.FredokaOne
		Desc.Text = Description
		Desc.TextScaled = true
		Desc.Visible = true
        -- no border size
	end
1 Like