[HELP] How would i make conveyor in roblox?

Hello! So i am making a game that’s related to game Make a Cake! - Roblox

But i have one small issue, and that’s about conveyors

How do they work, and what is used for conveyor?

Provide examples as possible, please!

So you would use AssemblyLinearVelocity on the target object, for example:

local part = script.Parent
local speed = 5 -- replace with desired speed
local function set()
	part.AssemblyLinearVelocity = part.CFrame.LookVector * speed
end
set()
speed.Changed:Connect(set)
part.Changed:Connect(function (prop)
	if prop == "CFrame" then
		set()
	end
end)

CFrame.LookVector is what direction the front face of the part is looking.

I’m just little bit too new to Roblox Physics, but i will be testing it soon.

Oh, and make sure the part is ANCHORED (very important, if you skip, then will not work)

Yeah, i know.

I always anchor the parts once i make new part.

local part = script.Parent
local speed = script.Parent.Speed -- replace with desired speed
local function set()
	part.AssemblyLinearVelocity = part.CFrame.LookVector * speed.Value
end
set()
speed.Changed:Connect(set)
part.Changed:Connect(function (prop)
	if prop == "CFrame" then
		set()
	end
end)

Modified the code little bit so it doesn’t give any error while speed gets changed.

image

Technically that code right there was my og, but I wasn’t sure if you wanted to use a numbervalue, so I omitted the value

It was NumberValue soooo yeah.

image

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.