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.