Hi All, i’ve got a dropper system but it seems to slow down and then pick back up and then slow down again and become very juddery. See video.
ANy idea why this is happening? As soon as there is more than 1 player on the server all of them are really slow and barly move at all. Yet the conveyors are working fine, i stand on them and away they go. But it’s the drops that are not working.
this is because the parts are being throttled or because the server doesnt know wich of the players needs to handle the parts. On the server set the parts network ownership to the owner of the plot.
local part = workspace.Part
part:SetNetworkOwner(Player)
Most likely a performance issue, try reducing the amount of unanchored items around the player, your character probably has NetworkOwnership over them already and you’re on mobile which isn’t the best for speed.
You should confirm if this happens on desktop.
local dropsFolder = game:GetService("ServerStorage").Drops
local Debris = game:GetService("Debris")
local Players = game:GetService("Players")
local Dropper = {}
Dropper.__index = Dropper
function Dropper.new(tycoon, instance, ownerPlayer)
local self = setmetatable({}, Dropper)
self.Tycoon = tycoon
self.Instance = instance
self.Rate = instance:GetAttribute("Rate")
self.DropTemplate = dropsFolder[instance:GetAttribute("Drop")]
self.DropSpawn = instance.Spout.Spawn
self.OwnerPlayer = ownerPlayer -- This assumes you're passing the player who owns the dropper
return self
end
function Dropper:Init()
coroutine.wrap(function()
while true do
self:Drop()
wait(self.Rate)
end
end)()
end
function Dropper:Drop()
local replicatedStorage = game:GetService("ReplicatedStorage")
local drop = self.DropTemplate:Clone()
drop.Position = self.DropSpawn.WorldPosition
drop.Parent = workspace -- Parent the drop to workspace or a specific folder within workspace
if drop:IsA("BasePart") then
drop:SetNetworkOwner(self.OwnerPlayer) -- Set the network owner to the owner player
end
-- Add the LiftAndCarry_Physical_ClientScript to the drop
local existingLocalScript = replicatedStorage:FindFirstChild("LiftAndCarry_Physical_ClientScript")
if existingLocalScript then
local clonedLocalScript = existingLocalScript:Clone()
clonedLocalScript.Parent = drop
end
-- Add the DragDetector to the drop
local existingDragDetector = replicatedStorage:FindFirstChild("DragDetector")
if existingDragDetector then
local clonedDragDetector = existingDragDetector:Clone()
clonedDragDetector.Parent = drop
end
Debris:AddItem(drop, 30)
end
return Dropper
You are destroying it after 30 seconds of creation? It looks like you are creating a item every second, so that means you’ll always have at least 30 items active in Workspace, are you destroying them once they hit the cash area? (Or where the item is meant to go)
That’s if they fall off the conveyor belt. It will be changed to being destroyed after 30 mins soon. as We’ve changed it where it can be picked up and carried untill they buy the conveyor.