- Try resizing each part to only 1 stud high
- Change the
BasePart.BottomSurface
property toEnum.SurfaceType.Inlet
- Change the
BasePart.BackSurface
,BasePart.FrontSurface
,BasePart.LeftSurface
,BasePart.RightSurface
, andBasePart.TopSurface
properties toEnum.SurfaceType.Weld
. - Try using
UnionOperation
s to reduce the number ofBasePart
s.
So what Iām gonna do to counter the problem I stated below is that I will set each item a attribute called bought and every 2 seconds it loops through every dropper and if its not bought itll ignore it and itll be forgotten for the left of itās life!!!
So far I havenāt encountered a texturizing tool that can texture unions into studsā¦
Alright guys after some careful cooking (I reached 80F), I think this script should do what I want it to do.
local itemsFolder = script.Parent.Parent
local ss = game.ServerStorage
local function drop(dropperModel, dropType)
local dropperModel = dropperModel
local dropPart1 = dropperModel:FindFirstChild("dropPart1")
local dropPart2 = dropperModel:FindFirstChild("dropPart2")
local dropPart3 = dropperModel:FindFirstChild("dropPart3")
local dropPart4 = dropperModel:FindFirstChild("dropPart4")
local dropValue = dropperModel:GetAttribute("DropValue")
if dropPart1 then
local newDrop = ss:WaitForChild(dropType.."Drop")
newDrop.Parent = dropperModel:FindFirstChild("Drops")
newDrop.CastShadow = false
newDrop.CFrame = dropPart1.CFrame
newDrop:SetAttribute("Value", dropValue)
newDrop.Name = dropType.."Drop"
newDrop.Anchored = false
end
if dropPart2 then
local newDrop = ss:WaitForChild(dropType.."Drop")
newDrop.Parent = dropperModel:FindFirstChild("Drops")
newDrop.CastShadow = false
newDrop.CFrame = dropPart1.CFrame
newDrop:SetAttribute("Value", dropValue)
newDrop.Name = dropType.."Drop"
newDrop.Anchored = false
end
if dropPart3 then
local newDrop = ss:WaitForChild(dropType.."Drop")
newDrop.Parent = dropperModel:FindFirstChild("Drops")
newDrop.CastShadow = false
newDrop.CFrame = dropPart1.CFrame
newDrop:SetAttribute("Value", dropValue)
newDrop.Name = dropType.."Drop"
newDrop.Anchored = false
end
if dropPart4 then
local newDrop = ss:WaitForChild(dropType.."Drop")
newDrop.Parent = dropperModel:FindFirstChild("Drops")
newDrop.CastShadow = false
newDrop.CFrame = dropPart1.CFrame
newDrop:SetAttribute("Value", dropValue)
newDrop.Name = dropType.."Drop"
newDrop.Anchored = false
end
end
while true do
task.wait(2)
for num, dropper in itemsFolder:GetChildren() do
if dropper:HasTag("Dropper") and dropper:GetAttribute("Bought") then
local dropType = dropper:GetAttribute("DropType")
drop(dropper, dropType)
end
end
end
So basically thereās a function that checks if the dropperModel has dropParts1, 2, 3, or 4, and then itāll generate a new drop from serverStorage based on paramater #2, drop type. The while loop loops through every item you have and if it is Bought and is a Dropper then it will fire the function. Let me know your thoughts on this and if there are some errors or things I could fix to reduce lag even more!