Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

SortOrder.Custom is deprecated, please switch to LayoutOrder - Help?

Asked by 6 years ago
Edited 6 years ago

CoreGui.RobloxGui.DeveloperConsole.Interior.WindowContainer.Window.Body.ActionBindings.ScrollingFrame.UIListLayout: SortOrder.Custom is deprecated, please switch to LayoutOrder


Good morning/afternoon/evening, everyone! I made a custom character gui that only works in Studio and when i do the Play mode, but not when I start an actual server for the game. The above response is what I am currently receiving from the Client Log when I look at the game statistics within the server. The buttons inside the Gui work, just no longer when i click them in a server to make the changes to the CustomCharacter model as well as the NPC animations fail to work. All suggestion and recommendations are more than appreciated! Thank you, for your time.

Respectfully,

sparkevin


This is the LocalScript in the StarterPack that I have:

repeat wait() until game.Workspace.CurrentCamera
local camera = game.Workspace.CurrentCamera

local character = game:GetService('ReplicatedStorage'):WaitForChild('CustomCharacter'):Clone()

local player = game.Players.LocalPlayer

local Hat = player:WaitForChild("Hat")
local Shirt = player:WaitForChild("Shirt")
local Pants = player:WaitForChild("Pants")

character.Parent = camera



function Update()
    for i,v in pairs(character:GetChildren()) do
        if v:IsA("Hat") or v:IsA("Pants") or v:IsA("Shirt") then
            v:remove()
        end
    end

    Hat.Value:Clone().Parent = character
    Shirt.Value:Clone().Parent = character
    Pants.Value:Clone().Parent = character

end


Hat.Changed:connect(function()
    Update()
end)

Shirt.Changed:connect(function()
    Update()
end)

Pants.Changed:connect(function()
    Update()
end)

And, this is the main LocalScript for the buttons and their functions.

local player = game:GetService('Players').LocalPlayer
local Hat = player:WaitForChild('Hat')
local HatFolder = game:GetService('ReplicatedStorage'):WaitForChild('Hats')
local char = game.Workspace.CurrentCamera:WaitForChild('CustomCharacter')

local Hats = {}

local hat1 = script.Parent:WaitForChild('Hat1Button')
local hat2 = script.Parent:WaitForChild('Hat2Button')
local hat3 = script.Parent:WaitForChild('Hat3Button')

local toggle = false

function AddHat(hatname)
    for i, v in next, HatFolder:GetChildren() do
    if v.Name == hatname then
      return v
    end
  end
  return nil
end

function RemoveHats()
  for i, v in next, Hats do
    v:Destroy()
  end
end

function Update()
  script.Parent:WaitForChild('HatName').Text = tostring(Hat.Value)
  wait(0.01)
end

hat1.MouseButton1Down:Connect(function()
    if not toggle then
        script.Parent.HatName.Text = 'Hat1'
    local DatHat = AddHat('Hat1')
    if DatHat then
        RemoveHats()
            DatHat = DatHat:Clone()
        table.insert(Hats, DatHat)
        DatHat.Parent = char
    end
        wait(0.01)
        script.Parent.Wear1.Visible = true
        script.Parent.Wear2.Visible = false
        script.Parent.Wear3.Visible = false
        Update()
    end
end)

hat2.MouseButton1Down:Connect(function()
    if not toggle then
        script.Parent.HatName.Text = 'Hat2'
    local DatHat = AddHat('Hat2')
    if DatHat then
        RemoveHats()
            DatHat = DatHat:Clone()
        table.insert(Hats, DatHat)
        DatHat.Parent = char
    end
        wait(0.01)
        script.Parent.Wear1.Visible = false
        script.Parent.Wear2.Visible = true
        script.Parent.Wear3.Visible = false
        Update()
    end
end)

hat3.MouseButton1Down:Connect(function()
    if not toggle then
        script.Parent.HatName.Text = 'Hat3'
    local DatHat = AddHat('Hat3')
    if DatHat then
        RemoveHats()
            DatHat = DatHat:Clone()
        table.insert(Hats, DatHat)
        DatHat.Parent = char
    end
        wait(0.01)
        script.Parent.Wear1.Visible = false
        script.Parent.Wear2.Visible = false
        script.Parent.Wear3.Visible = true
        Update()
    end
end)
1
Community Guidelines: Do not post errors caused by Roblox Studio or Roblox Core Scripts. cabbler 1942 — 6y
0
Is your game fe? TheeDeathCaster 2368 — 6y
0
@TheeDeathCaster It is not. sparkevin 36 — 6y
0
The warning you got is from Roblox itself and has nothing to do with your problem. It’s probably a script in your GUI that’s the problem. User#20279 0 — 6y
View all comments (3 more)
0
@Denny9876 All I have are buttons scripts which update and change the NPC character. sparkevin 36 — 6y
0
Provide the script for us? User#19524 175 — 6y
0
@incapaz Just updated the post with the scripts now. sparkevin 36 — 6y

Answer this question