I am a new Lua Coder and i tried to code a warning script where the moderator writes a message of warning to the specified user. But it seems to be going wrong, I tried to look online and change a few things but I seem to be getting the same error of this-
Error- SliceCenter ((507.000000,112.000000), (509.000000,113.000000)) is outside the bounds of imageOffset ((500.000000,112.000000), (501.000000,113.000000)) for GuiImage[CoreGui.TopBar.TopBarFrame.RightFrame.MoreMenu.MoreMenuContainer.OverlayContextualMenu.PositionFrame.BaseMenu.ClippingFrame.ScrollingFrame.cell 2.StateOverlay]
Here is my code.
local Name = game.Players.Name local InputName = script.Parent.Parent.PlayerUsername.Text local WarnReason = script.Parent.Parent.Reason.Text script.Parent.Parent.WARN.MouseButton1Click() if InputName == Name then script.Parent.Parent.WarningToPlayerNotify.Visible = true local WarnDisplay = Instance.new('TextLabel') -----Configuraitons----- WarnDisplay.BackgroundColor3 = {0,0,0} WarnDisplay.BackgroundTransparency = {0.5} WarnDisplay.Position = {0.238,-0.319} WarnDisplay.Size = {511,50} ---Text Configurations-- WarnDisplay.Font = Enum.FontSize.Size14 WarnDisplay.Font = Enum.Font.Code WarnDisplay.TextColor3 = {255,255,255} ------------------------ ----Text Display Work--- WarnDisplay.Text = 'Reason: '..WarnReason WarnDisplay.Text = 'Next Punishment: Mute|Kick or Ban' ------------------------ wait(5) WarnDisplay.Visible = false script.Parent.Parent.WarningToPlayerNotify.Visible = false end if InputName ~= Name then script.Parent.Parent.WarningErrorMessage.Visible = true wait(5) script.Parent.Parent.WarningErrorMessage.Visible = false end
Your script isn't causing this error, so don't worry. It's an issue with Roblox that should be fixed soon.