Hey everyone, for some reason I keep getting the title as an error in the output. I didn’t change anything in the game, and even reverted versions multiple times, does anyone know if this could be a roblox error?
Local Script:
local repStor = game:GetService("ReplicatedStorage")
local frameSample = repStor:WaitForChild("OrderSample")
local updateOrder = repStor:WaitForChild("UpdateOrder")
local addToQueue = repStor:WaitForChild("AddToQueue")
local finishOrder = repStor:WaitForChild("FinishOrder")
local Players = game:GetService("Players")
local localPlayer = game.Players.LocalPlayer
local removeFrame = repStor:WaitForChild("RemoveFrame")
local playerGui = localPlayer:WaitForChild("PlayerGui")
local ordersInQueue = repStor:WaitForChild("OrdersInQueue")
local updatePos = repStor:WaitForChild("RepositionOrder")
local scrollingFrame = playerGui.OrderGui.Back.ScrollingFrame
local frameIDs = {
}
updateOrder.OnClientEvent:Connect(function(OrderPlayer, orderItem, frameID)
--if localPlayer:GetRankInGroup(13522423) >= 5 then
local playerGui = localPlayer.PlayerGui
local orderBack = playerGui.OrderGui.Back
local orderScrollingFrame = orderBack.ScrollingFrame
local amountOfSampleFrames = repStor:WaitForChild("CurrentOrders").Value
local _samplePositions = {
UDim2.new(0.029, 0,0.039, 0);
UDim2.new(0.026, 0,0.391, 0);
UDim2.new(0.027, 0,0.752, 0)
}
local orderSample = frameSample:Clone()
orderSample.PlayerName.Text = OrderPlayer.Name
orderSample.OrderItem.Text = orderItem
orderSample.Name = "Frame_"..frameID
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(OrderPlayer.UserId, thumbType, thumbSize)
orderSample.PlayerAvatar.Image = content
if amountOfSampleFrames <= 3 then
orderSample.Parent = orderScrollingFrame
orderSample.Position = _samplePositions[amountOfSampleFrames]
else
warn("Amount of sample frames is greater than 3")
addToQueue:FireServer(orderSample)
--end
end
end)
finishOrder.OnClientEvent:Connect(function(uiElement)
game:GetService("Debris"):AddItem(uiElement, 0.05)
end)
removeFrame.OnClientEvent:Connect(function(frameID)
local sampleFrame = scrollingFrame:FindFirstChild(frameID)
if sampleFrame then
if ordersInQueue.Value > 0 then
game.ReplicatedStorage.RepositionOrder:FireServer(sampleFrame.Position)
end
sampleFrame:Destroy()
end
end)
updateOrder.OnClientEvent:Connect(function(frame, framePosition)
frame.Parent = localPlayer.PlayerGui.OrderGui.Back.ScrollingFrame -- Line with the error
frame.Position = UDim2.new(framePosition)
end)
game:GetService("ReplicatedStorage").AddToClient.OnClientEvent:Connect(function(frame)
frame.Parent = game.ReplicatedStorage
end)
game.ReplicatedStorage.QueueOrders.ChildRemoved:Connect(function(child)
if child:IsA("Frame") then
game.ReplicatedStorage.OrdersInQueue.Value -= 1
end
end)
game.ReplicatedStorage.QueueOrders.ChildAdded:Connect(function(child)
if child:IsA("Frame") then
game.ReplicatedStorage.OrdersInQueue.Value += 1
end
end)
Server Script firing the event:
game.ReplicatedStorage.RepositionOrder.OnServerEvent:Connect(function(player, sampleFramePos)
local randomQueueOrder = game.ReplicatedStorage.QueueOrders:GetChildren()
local randomChild = randomQueueOrder[math.random(1, #randomQueueOrder)]
game.ReplicatedStorage.UpdateOrder:FireAllClients(randomChild, sampleFramePos)
end)
Local Script firing the Server Event:
removeFrame.OnClientEvent:Connect(function(frameID)
local sampleFrame = scrollingFrame:FindFirstChild(frameID)
if sampleFrame then
if ordersInQueue.Value > 0 then
game.ReplicatedStorage.RepositionOrder:FireServer(sampleFrame.Position)
end
sampleFrame:Destroy()
end
end)