I have made a spawning system and the conveyors are buggy
i do not have a script for the conveyors just changed the property and it works
The Problems
the shops conveyor only goes the right way if the shop is faced a certain way
I Don’t know how to fix it
No Posts about it
ShopMain.Spawn = function(player: Player, ForSaleSign: Model, SPAWN)
local profile = Manager.Profiles[player]
if profile == nil then return end
--// Notify Player They Claimed Shop!
Remotes.Notify:FireClient(player, "Success", "Claimed Shop!")
--//Set The Parent And stuff
local hasStandBoolean = player:WaitForChild("hasStand")
hasStandBoolean.Value = true
local newTemp = ShopTemp:Clone()
newTemp.Parent = ForSaleSign.Parent
--// Fire To Client To Enable Proximities
Remotes.Claimed:FireClient(player, newTemp)
--// Setup for newTemp/Shop
newTemp.Parent:SetAttribute("Owner", player.UserId)
newTemp.Parent.ForSaleSign.Parent = ServerStorage
newTemp:PivotTo(SPAWN.CFrame)
--// Functions last
DisplayEdit(player, newTemp)
UpdateDisplay(player, newTemp)
ThrowAway(newTemp)
GiveDough(newTemp)
FormingDonut(newTemp)
LoadPasses(player)
end
So far I can see, you don’t show how you actually set up the conveyor, which could be useful to know, since you state that that is where the issue is…
But, I am guessing you are probably using this line to assign the movement of parts that land on the conveyor:
conveyorPart.Velocity = Vector3.new(10, 0, 0)
The Vector3 value will be from the world’s view, so the conveyor will always push the items towards the same direction no matter their orientation. A way to fix this, is to get a Vector3 value from the conveyor itself.
To do that, simply right-click your conveyor part and enable the “Show Orientation Indicator”. Make sure that the conveyor is facing to the direction you want to push the part. Then replace the line of code I indicated before to the following:
local velocity = 10
conveyorPart.Velocity = conveyorPart.CFrame.LookVector * velocity
This summons a Vector3 value that is based off of the conveyor’s orientation, not based off of the world’s orientation.