AssemblyLinearVelocity won't change via script

I’ve been trying to script a working conveyor, but the AssemblyLinearVelocity won’t change using script. I tried the property manually, but just removes my custom setting and resets to 0,0,0. I need it anchored too. my code is working fine, but the conveyor just auto sets the AssemblyLinearVelocity to 0,0,0. Here’s my code (Its from B Ricey’s tycoon tutorials on youtube) it’s also a module script as well.

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 = belt.CFrame.LookVector * self.Speed
end

return Conveyor
2 Likes

no errors in the output window?

1 Like

Nope. Everything works, but for some reason i can’t change the velocity.

is the result of belt.CFrame.LookVector * self.Speed a vector3 value? maybe the game doesnt recognise it and therefore doesnt assign it

It is. let me send a video of my problem


here it is. If it helps any, the item is in server storage.

I’m getting an error when I try to play the video, can you upload it to somewhere like gyazo?

alright, its because your browser is unsupported. I had to use chrome to play it. I’ll just upload it to youtube

so basically i kinda figured it out. My script is changing the velocity in the conveyor before it reaches workspace. Because its trying to change it in server storage, it resets to 0,0,0

alright then if everything works as intended maybe you should mark your reply as the solution