Conveyor Belt Doesn't Work

In a tycoon I’m creating I’m working on a conveyor belt, but for some reason it does not work.

Code segment:

local Conveyor = {}
Conveyor.__index = Conveyor

function Conveyor.new(tycoon, instance)
	local self = setmetatable({}, Conveyor)
	self.Instance = instance
	self.Speed = instance:GetAttribute("Speed")
	return self
end


function Conveyor:Init()
	local belt = self.Instance.Belt
	belt.AssemblyLinearVelocity = Vector3.new(5, 0, 0)
	print("belt work")
end


return Conveyor

Basically when I assign the value of the belt’s AssemblyLinearVelocity, it does not change. However, when I change it when the game is running, it works. I checked my attributes, so I’m not sure what else I can do to fix this. Help is much appreciated.

Have you anchored the part? . .

1 Like

Yes, the part is anchored. This has got to be the dumbest issue I’ve ever had lol

I assume it prints the message?

Just realized the message also doesn’t print, do you have any conclusions from this?

Only that your initialize function isnt working… from what i read it requires a module right?

1 Like

LOL I figured out the issue. Basically the conveyor instance was tagged, and the tag’s name was spelt incorrectly in comparison to the module. I knew the solution would be stupid. All because I couldn’t spell it correctly. Thanks for the help anyways though lol

1 Like